]> gitweb @ CieloNegro.org - sugar.git/commitdiff
Auto commit by The Sugar System.
authorPHO <pho@cielonegro.org>
Thu, 12 May 2016 09:40:55 +0000 (18:40 +0900)
committerPHO <pho@cielonegro.org>
Thu, 12 May 2016 09:40:55 +0000 (18:40 +0900)
dot-files/_zshenv

index d0b413fb5b5e71baa9d488cd502fc9e621a46575..7164c3fe710feae5308ac70eaf7d5e51980235ad 100644 (file)
@@ -4,10 +4,10 @@ function append_path {
     local _varname="$1"
     local _path="$2"
 
-    if [ -d "$_path" ]; then
+    if [[ -d "$_path" ]]; then
         local _var=$(eval echo $(printf '$%s' "$_varname"))
 
-         if [ "$_var" = "" ]; then
+        if [[ "$_var" = "" ]]; then
             eval $(printf 'export %s="%s"' "$_varname" "$_path")
         else
             eval $(printf 'export %s="%s:$%s"' "$_varname" "$_path" "$_varname")