aboutsummaryrefslogtreecommitdiffstats
path: root/askForPass.sh
diff options
context:
space:
mode:
Diffstat (limited to 'askForPass.sh')
-rwxr-xr-xaskForPass.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/askForPass.sh b/askForPass.sh
new file mode 100755
index 00000000..b7ee81a7
--- /dev/null
+++ b/askForPass.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+PF=$*
+UUID=`uuidgen`
+mkfifo /tmp/$UUID
+SCRIPT=`echo tell application \"CocoaMySQL\" to authenticate tunnel \"$TUNNEL_NAME\" query phrase \"$PF\" fifo \"/tmp/$UUID\"`
+echo $SCRIPT > /tmp/test
+#PASS=`osascript -e "$SCRIPT"`;
+osascript -e "$SCRIPT" > /dev/null 2>&1
+#echo $PASS;
+PASS=`cat /tmp/$UUID`
+echo $PASS
+rm -f /tmp/$UUID \ No newline at end of file