Bladeren bron

Don't need echo

Bob Mottram 8 jaren geleden
bovenliggende
commit
87511b25ce
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2
    2
      src/freedombone-pass

+ 2
- 2
src/freedombone-pass Bestand weergeven

@@ -72,7 +72,7 @@ function pass_show_help {
72 72
 }
73 73
 
74 74
 function pad_string {
75
-    echo -n -e "$1" | sed -e :a -e 's/^.\{1,1024\}$/& /;ta'
75
+    echo -n -e "$1" | sed -e :a -e 's/^.\{1,128\}$/& /;ta'
76 76
 }
77 77
 
78 78
 while [[ $# > 1 ]]
@@ -134,7 +134,7 @@ else
134 134
     if [ ! -d ~/.passwords/$CURR_USERNAME ]; then
135 135
         mkdir -p ~/.passwords/$CURR_USERNAME
136 136
     fi
137
-    echo -n "$(pad_string '${CURR_PASSWORD}')" | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USERNAME/$CURR_APP
137
+    pad_string "${CURR_PASSWORD}" | gpg -ca --cipher-algo AES256 --passphrase "$MASTER_PASSWORD" > ~/.passwords/$CURR_USERNAME/$CURR_APP
138 138
     if [ ! -f ~/.passwords/$CURR_USERNAME/$CURR_APP ]; then
139 139
         exit 5
140 140
     fi