]> gitweb.fluxo.info Git - keyringer.git/commitdiff
use \n (like break) for array separator instead of space to support
authorJamie McClelland <jm@mayfirst.org>
Fri, 17 Sep 2010 19:20:05 +0000 (15:20 -0400)
committerJamie McClelland <jm@mayfirst.org>
Fri, 17 Sep 2010 19:20:05 +0000 (15:20 -0400)
files with spaces between lines.

share/keyringer/append

index 2b3eb27b44488fc3db076851be579a4aac7764ec..be6bc7fd2f2679a748a2a28fe9769df4f52fce25 100755 (executable)
@@ -22,6 +22,9 @@ elif [ ! -f "$KEYDIR/$FILE" ]; then
   exit 1
 fi
 
+OLDIFS=$IFS
+IFS=$'\n'
+
 CONTENT=($(keyringer_exec decrypt $BASEDIR $FILE))
 
 echo "This is the current content of $FILE:"
@@ -37,3 +40,5 @@ NEW=( ${CONTENT[@]} ${APPEND[@]} )
 for element in $(seq 0 $((${#NEW[@]} - 1))); do
   echo ${NEW[$element]}
 done | keyringer_exec encrypt $BASEDIR $FILE
+
+IFS="$OLDIFS"