[Blends-commit] [SCM] ezgo branch, master, updated. c4c461e3d7b1812feaa4bc7944cc2d6c2a179c15

Franklin franklin at goodhorse.idv.tw
Thu Feb 26 15:13:16 UTC 2015


The following commit has been merged in the master branch:
commit 0b95f0bdb7b35ad25e394beccf96ebc6d6a489d0
Author: Franklin <franklin at goodhorse.idv.tw>
Date:   Mon Jan 19 12:45:21 2015 +0800

    Judge if config file exists before changing configuration

diff --git a/ezgo-misc/update-ezgo-misc b/ezgo-misc/update-ezgo-misc
index a679b63..14a1c7f 100755
--- a/ezgo-misc/update-ezgo-misc
+++ b/ezgo-misc/update-ezgo-misc
@@ -18,7 +18,9 @@ case "$1" in
     mv /usr/share/ezgo/ezgo-misc/7-Zip /usr/local/
     rm -f 7zip.tar.gz
     # fix tuxpaint
-    sed -i '$ a\sysfonts=yes' /etc/tuxpaint/tuxpaint.conf
+    if [ -e /etc/tuxpaint/tuxpaint.conf ]; then
+	    sed -i '$ a\sysfonts=yes' /etc/tuxpaint/tuxpaint.conf
+    fi
     # libreoffice configurations
     tar xf libreoffice.tar.gz
     rm -rf /etc/skel/.config/libreoffice
@@ -26,7 +28,9 @@ case "$1" in
     chown -R root.root /etc/skel/.config/libreoffice
     rm -f libreoffice.tar.gz
     # fix audacity.mo path from zh to zh_CN
-    mv /usr/share/locale/zh/LC_MESSAGES/audacity.mo /usr/share/locale/zh_CN/LC_MESSAGES/audacity.mo
+    if [ -e /usr/share/locale/zh/LC_MESSAGES/audacity.mo ]; then
+	    mv /usr/share/locale/zh/LC_MESSAGES/audacity.mo /usr/share/locale/zh_CN/LC_MESSAGES/audacity.mo
+    fi
     ;;
   remove)
 	rm -f /usr/share/applications/7zip.desktop
@@ -37,8 +41,12 @@ case "$1" in
 	rm -f /usr/share/applications/my_ezgo.desktop
 	rm -f /usr/share/applications/about_ezgo.desktop
     rm -f /usr/local/7-Zip
-    sed -i 's/sysfonts=yes//g' /etc/tuxpaint/tuxpaint.conf
+    if [ -e /etc/tuxpaint/tuxpaint.conf ]; then
+    	sed -i 's/sysfonts=yes//g' /etc/tuxpaint/tuxpaint.conf
+    fi
     rm -rf /etc/skel/.config/libreoffice
-    mv /usr/share/locale/zh_CN/LC_MESSAGES/audacity.mo /usr/share/locale/zh/LC_MESSAGES/audacity.mo
+    if [ -e /usr/share/locale/zh_CN/LC_MESSAGES/audacity.mo ]; then
+	    mv /usr/share/locale/zh_CN/LC_MESSAGES/audacity.mo /usr/share/locale/zh/LC_MESSAGES/audacity.mo
+    fi
     ;;
 esac

-- 
Blend for educatipn with asian specific adaptations



More information about the Blends-commit mailing list