diff options
author | LAN-TW <lantw44@gmail.com> | 2013-09-19 12:49:43 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-09-19 12:49:43 +0800 |
commit | 445b244de305c6a2021e3a26d8439cd4bdfbd736 (patch) | |
tree | a25959bcede544329033b770ce4feb3098fc97a3 | |
parent | c97aae5a472eed886deb35a73493c7b611d9a39e (diff) | |
download | xenstore-editor-445b244de305c6a2021e3a26d8439cd4bdfbd736.tar.gz xenstore-editor-445b244de305c6a2021e3a26d8439cd4bdfbd736.tar.zst xenstore-editor-445b244de305c6a2021e3a26d8439cd4bdfbd736.zip |
Remove trailing whitespaces
-rw-r--r-- | README.txt | 2 | ||||
-rwxr-xr-x | xenstore-editor-zh_TW.utf8.sh | 10 | ||||
-rwxr-xr-x | xenstore-editor.sh | 10 | ||||
-rwxr-xr-x | xenstore-viewer-zh_TW.utf8.sh | 2 | ||||
-rwxr-xr-x | xenstore-viewer.sh | 2 |
5 files changed, 13 insertions, 13 deletions
@@ -7,4 +7,4 @@ 1. 請在 Xen Domain 0 執行,並確定 xenstored 已啟動 2. xenstore 相關管理工具 3. GNU bash - 4. (c)dialog + 4. (c)dialog diff --git a/xenstore-editor-zh_TW.utf8.sh b/xenstore-editor-zh_TW.utf8.sh index d83aeff..bb63236 100755 --- a/xenstore-editor-zh_TW.utf8.sh +++ b/xenstore-editor-zh_TW.utf8.sh @@ -44,7 +44,7 @@ function getusernewvalue () { do $DIALOG --title "$1" --extra-button --extra-label "檔案瀏覽器" --inputbox "$2" 0 0 "$initvalue" 2> "$tmpfile" local exitstat=$? - case "$exitstat" in + case "$exitstat" in 0|1) return "$exitstat" ;; @@ -54,7 +54,7 @@ function getusernewvalue () { local selectedfile="/" local nowvalue="`cat "$tmpfile"`" local parentdir="`dirname "$nowvalue"`" - if [ "`echo "$nowvalue" | cut -c 1`" != "/" ] || [ '!' -e "$parentdir" ] + if [ "`echo "$nowvalue" | cut -c 1`" != "/" ] || [ '!' -e "$parentdir" ] then $DIALOG --title "檔案瀏覽器" --msgbox "$parentdir 目錄不存在" 0 0 initdir="`pwd`/" @@ -163,7 +163,7 @@ do then prevdir="$current" current="`cat "$tmpfile"`" - else + else setdefault=1 setdefaultvalue="$dialogout" fi @@ -193,7 +193,7 @@ do fi if [ "$dialogexit" = "0" ] then - case "$dialogout2" in + case "$dialogout2" in "Add") $DIALOG --title "$scriptshorttitle - 編輯 - Add" --inputbox "名稱" 0 0 2> "$tmpfile" if [ "$?" = "0" ] @@ -244,7 +244,7 @@ do ;; "Remove") fullpath="`getxenfullpath "$current" "$dialogout"`" - if $DIALOG --title "$scriptshorttitle - 編輯 - Remove" --yesno "你確定要刪除 $dialogout 嗎?" 0 0 + if $DIALOG --title "$scriptshorttitle - 編輯 - Remove" --yesno "你確定要刪除 $dialogout 嗎?" 0 0 then outmsg="`xenstore-rm "$fullpath" 2>&1`" if [ "$?" != "0" ] diff --git a/xenstore-editor.sh b/xenstore-editor.sh index 1d5550a..1faab48 100755 --- a/xenstore-editor.sh +++ b/xenstore-editor.sh @@ -44,7 +44,7 @@ function getusernewvalue () { do $DIALOG --title "$1" --extra-button --extra-label "File Browser" --inputbox "$2" 0 0 "$initvalue" 2> "$tmpfile" local exitstat=$? - case "$exitstat" in + case "$exitstat" in 0|1) return "$exitstat" ;; @@ -54,7 +54,7 @@ function getusernewvalue () { local selectedfile="/" local nowvalue="`cat "$tmpfile"`" local parentdir="`dirname "$nowvalue"`" - if [ "`echo "$nowvalue" | cut -c 1`" != "/" ] || [ '!' -e "$parentdir" ] + if [ "`echo "$nowvalue" | cut -c 1`" != "/" ] || [ '!' -e "$parentdir" ] then $DIALOG --title "File Browser" --msgbox "$parentdir directory does not exits" 0 0 initdir="`pwd`/" @@ -163,7 +163,7 @@ do then prevdir="$current" current="`cat "$tmpfile"`" - else + else setdefault=1 setdefaultvalue="$dialogout" fi @@ -193,7 +193,7 @@ do fi if [ "$dialogexit" = "0" ] then - case "$dialogout2" in + case "$dialogout2" in "Add") $DIALOG --title "$scriptshorttitle - Edit - Add" --inputbox "Name" 0 0 2> "$tmpfile" if [ "$?" = "0" ] @@ -244,7 +244,7 @@ do ;; "Remove") fullpath="`getxenfullpath "$current" "$dialogout"`" - if $DIALOG --title "$scriptshorttitle - Edit - Remove" --yesno "Do you really want to delete the value $dialogout?" 0 0 + if $DIALOG --title "$scriptshorttitle - Edit - Remove" --yesno "Do you really want to delete the value $dialogout?" 0 0 then outmsg="`xenstore-rm "$fullpath" 2>&1`" if [ "$?" != "0" ] diff --git a/xenstore-viewer-zh_TW.utf8.sh b/xenstore-viewer-zh_TW.utf8.sh index 782c386..19f0e72 100755 --- a/xenstore-viewer-zh_TW.utf8.sh +++ b/xenstore-viewer-zh_TW.utf8.sh @@ -152,7 +152,7 @@ else done fi -if [ -z "$xenstorepath" ] +if [ -z "$xenstorepath" ] then echo "找不到 domain $xendominput" && exit 42 else diff --git a/xenstore-viewer.sh b/xenstore-viewer.sh index 6759bd6..b56c79f 100755 --- a/xenstore-viewer.sh +++ b/xenstore-viewer.sh @@ -152,7 +152,7 @@ else done fi -if [ -z "$xenstorepath" ] +if [ -z "$xenstorepath" ] then echo "Domain $xendominput not found." && exit 42 else |