diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-03-22 12:01:52 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-03-22 12:03:12 -0600 |
commit | 47fed2c5d47a03fad7b91bfb890eed257e9c1b2d (patch) | |
tree | 46666ba401340524ab9c217a062c366f6e5ec818 /contrib/pwsafe2pass.sh | |
parent | 414bab7d973b50431854496811608c549fb541e1 (diff) | |
download | pass-47fed2c5d47a03fad7b91bfb890eed257e9c1b2d.tar.gz pass-47fed2c5d47a03fad7b91bfb890eed257e9c1b2d.tar.bz2 pass-47fed2c5d47a03fad7b91bfb890eed257e9c1b2d.zip |
Makefile: do not use recursion and organize
Diffstat (limited to 'contrib/pwsafe2pass.sh')
-rwxr-xr-x | contrib/pwsafe2pass.sh | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/contrib/pwsafe2pass.sh b/contrib/pwsafe2pass.sh deleted file mode 100755 index c29bb3f..0000000 --- a/contrib/pwsafe2pass.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# Copyright (C) 2013 Tom Hendrikx <tom@whyscream.net>. All Rights Reserved. -# This file is licensed under the GPLv2+. Please see COPYING for more information. - -export=$1 - -IFS=" " # tab character -cat "$export" | while read uuid group name login passwd notes; do - test "$uuid" = "# passwordsafe version 2.0 database" && continue - test "$uuid" = "uuid" && continue - test "$name" = '""' && continue; - - group="$(echo $group | cut -d'"' -f2)" - login="$(echo $login | cut -d'"' -f2)" - passwd="$(echo $passwd | cut -d'"' -f2)" - name="$(echo $name | cut -d'"' -f2)" - - # cleanup - test "${name:0:4}" = "http" && name="$(echo $name | cut -d'/' -f3)" - test "${name:0:4}" = "www." && name="$(echo $name | cut -c 5-)" - - entry="" - test -n "$login" && entry="${entry}login: $login\n" - test -n "$passwd" && entry="${entry}pass: $passwd\n" - test -n "$group" && entry="${entry}group: $group\n" - - echo Adding entry for $name: - echo -e $entry | pass insert --multiline --force "$name" - test $? && echo "Added!" -done |