<pre style='margin:0'>
Zhenfu Shi (i0ntempest) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/58c070e8da51dc35f7d1c9c3df3d2f0e8e6c4ad4">https://github.com/macports/macports-ports/commit/58c070e8da51dc35f7d1c9c3df3d2f0e8e6c4ad4</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 58c070e8da5 wifi-password: submission
</span>58c070e8da5 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 58c070e8da51dc35f7d1c9c3df3d2f0e8e6c4ad4
</span>Author: i0ntempest <szf1234@me.com>
AuthorDate: Thu Mar 14 19:04:29 2024 -0400
<span style='display:block; white-space:pre;color:#404040;'> wifi-password: submission
</span>---
net/wifi-password/Portfile | 46 ++++++++++++++++++++++
...h-aa8b59d3d7c45eef01f93b80fd998946b8ed57e7.diff | 13 ++++++
2 files changed, 59 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/wifi-password/Portfile b/net/wifi-password/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..fd7c38b918b
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/wifi-password/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,46 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup rauchg wifi-password 0.1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms macosx
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs noarch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories net security
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {i0ntempest @i0ntempest} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Get the password of the wifi you're on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 653ffccd4114f3fd756e4f44e00b9e3072910460 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 7ed783685ed43a94878d148346cba01428dbe1d99d463407be937d0f1b57c67c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 1848
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patch.args -p1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-aa8b59d3d7c45eef01f93b80fd998946b8ed57e7.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This script is not POSIX compliant
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [variant_isset mp_bash] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|#!/usr/bin/env sh|#!${prefix}/bin/bash|" ${worksrcpath}/wifi-password.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|#!/usr/bin/env sh|#!/usr/bin/env bash|" ${worksrcpath}/wifi-password.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|echo|echo -e|g" ${worksrcpath}/wifi-password.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall ${worksrcpath}/wifi-password.sh ${destroot}${prefix}/bin/wifi-password
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${destroot}${prefix}/share/doc/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 644 -W ${worksrcpath} Readme.md ${destroot}${prefix}/share/doc/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant mp_bash description {Explicitly use MacPorts Bash as interpreter} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append port:bash
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/wifi-password/files/patch-aa8b59d3d7c45eef01f93b80fd998946b8ed57e7.diff b/net/wifi-password/files/patch-aa8b59d3d7c45eef01f93b80fd998946b8ed57e7.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..787234b28fb
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/wifi-password/files/patch-aa8b59d3d7c45eef01f93b80fd998946b8ed57e7.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/wifi-password.sh b/wifi-password.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index ac2d0ef..0ca76bd 100755
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/wifi-password.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/wifi-password.sh
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -75,7 +75,7 @@ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sleep 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # source: http://blog.macromates.com/2006/keychain-access-from-shell/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-pwd="`security find-generic-password -ga \"$ssid\" 2>&1 >/dev/null`"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++pwd="`security find-generic-password -D 'AirPort network password' -ga \"$ssid\" 2>&1 >/dev/null`"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if [[ $pwd =~ "could" ]]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ echo "ERROR: Could not find SSID \"$ssid\"" >&2
</span></pre><pre style='margin:0'>
</pre>