diff options
Diffstat (limited to 'handlers')
-rw-r--r-- | handlers/easydialog.sh | 25 | ||||
-rw-r--r-- | handlers/rdiff.helper | 17 |
2 files changed, 23 insertions, 19 deletions
diff --git a/handlers/easydialog.sh b/handlers/easydialog.sh index ce7d31e..1ae3c83 100644 --- a/handlers/easydialog.sh +++ b/handlers/easydialog.sh @@ -164,19 +164,20 @@ displayForm() { local form= local xpos=1 - for ((i=0; i < $_form_items ; i++)); do - label=${_form_labels[$i]} - text=${_form_text[$i]} - if [ "$text" == "" ]; then - text='_empty_' - fi - form=`echo -e "$form $label $xpos 1" $text "$xpos $max_length 30 30"` - let "xpos += _form_gap" - done - - $DIALOG --form "$_form_title" 0 0 20 $form 2> $temp + ( + echo -n -e "--form '$_form_title' 0 0 20" + for ((i=0; i < $_form_items ; i++)); do + label=${_form_labels[$i]} + text=${_form_text[$i]} + if [ "$text" == "" ]; then + text='_empty_' + fi + echo -n -e "$form $label $xpos 1 '$text' $xpos $max_length 30 30" + let "xpos += _form_gap" + done + ) | xargs $DIALOG 2> $temp local status=$? - [ $status = 0 ] && REPLY=$(cat $temp) + [ $status = 0 ] && REPLY=`cat $temp` rm -f $temp return $status } diff --git a/handlers/rdiff.helper b/handlers/rdiff.helper index 1364367..83549ec 100644 --- a/handlers/rdiff.helper +++ b/handlers/rdiff.helper @@ -22,22 +22,23 @@ rdiff_wizard() { formItem include /etc formItem include /root formItem include /home - formItem include /usr/local/__star__bin - formItem include /var/lib/dpkg/status__star__ + formItem include '/usr/local/*bin' + formItem include '/var/lib/dpkg/status*' formItem include formItem include formItem include displayForm [ $? = 1 ] && return; - includes= + set -o noglob for i in $REPLY; do [ "$i" != "_empty_" ] && includes="$includes\ninclude = $i" done + set +o noglob startForm "rdiff action wizard: excludes" - formItem exclude /home/__star__/.gnupg + formItem exclude '/home/*/.gnupg' formItem exclude formItem exclude displayForm @@ -45,18 +46,20 @@ rdiff_wizard() { [ $? = 1 ] && return; excludes= + set -o noglob for i in $REPLY; do [ "$i" != "_empty_" ] && excludes="$excludes\nexclude = $i" done - + set +o noglob + get_next_filename $configdirectory/90.rdiff cat > $next_filename <<EOF [source] type = local keep = $keep EOF - echo -e $includes >> $next_filename - echo -e $excludes >> $next_filename + echo -e "$includes" >> $next_filename + echo -e "$excludes" >> $next_filename cat >> $next_filename <<EOF [dest] |