diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-07 17:30:31 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-07 17:30:31 +0200 | 
| commit | 873d076206ac58b68f35b8e489fc0ac303b9dd5a (patch) | |
| tree | f5fec40300a85239958dc9656dece0aef64bdcc2 /bin | |
| parent | a3792a9325a0db8390249d6966d62d702a471381 (diff) | |
made posix compliant
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/guiscripts/dmpassgen | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/guiscripts/dmpassgen b/bin/guiscripts/dmpassgen index 12d911d..d193998 100755 --- a/bin/guiscripts/dmpassgen +++ b/bin/guiscripts/dmpassgen @@ -1,16 +1,17 @@  #!/usr/bin/env sh -choice="$(echo -ne "multiline\nsingle" | dmenu -l 1 -g 2)" +choice="$(echo "multiline\nsingle" | dmenu -l 1 -g 2)"  test -z "${choice}" && exit 1 -password="$(echo -n "" | dmenu -p "name:")" +password="$(dmenu -p "name:" </dev/null)"  test -z "${password}" && exit 1 -if [[ "${choice}" == "multiline" ]] +if [ "${choice}" = "multiline" ]  then -	logins="$(ls -1 ~/.password-store/e-mails | awk -F '.gpg' '{print $1}')" -    login="$(echo "$logins" | dmenu -g 1 -l 8 -p "login:")" +	login="$(ls -1 ~/.password-store/e-mails | +		sed 's/\.gpg$//' |  +		dmenu -g 1 -l 8 -p "login:")"      test -z "${login}" && exit 1 -    url="$(echo -n "" | dmenu -p "url:")" +    url="$(dmenu -p "url:" </dev/null)"      test -z "${url}" && exit 1      echo "${password}\nlogin: ${login}\nurl: ${url}" |  		pass insert -mf "${password}"  | 
