Use ZSH syntax
@@ -131,7 +131,7 @@ fi
source ${TURBINE_HOME}/scripts/turbine-config.sh
if (( ${?} != 0 ))
then
- echo "Turbine installation is broken!"
+ print "Turbine installation is broken!"
exit 1
fi
@@ -179,9 +179,9 @@ print_help()
if (( PRINT_HELP ))
then
- echo
+ print
report_version
- echo
+ print
print_help
exit 0
fi
@@ -210,14 +210,14 @@ ARGS=( ${*} )
if [[ ! -f ${PROGRAM} ]]
then
- echo "turbine: Program not found: ${PROGRAM}"
+ print "turbine: Program not found: ${PROGRAM}"
exit 1
fi
if [[ ${#PROGRAM%.swift} != ${#PROGRAM} ]]
then
- echo "turbine: Given a Swift script: ${PROGRAM}"
- echo "\t Turbine inputs are normally *.tic or *.tcl"
- echo "\t Use stc to generate a *.tic from a *.swift"
+ print "turbine: Given a Swift script: ${PROGRAM}"
+ print "\t Turbine inputs are normally *.tic or *.tcl"
+ print "\t Use stc to generate a *.tic from a *.swift"
exit 1
fi
@@ -251,11 +251,11 @@ check_machine()
[[ ${MACHINE_MODE} == ${M} ]] && return
done
# We didn't find a match
- echo "No such machine: ${MACHINE_MODE}"
+ print "No such machine: ${MACHINE_MODE}"
exit 1
}
-if [[ -n ${MACHINE_MODE} ]]
+if (( ${#MACHINE_MODE} != 0 ))
then
# Use a scheduler script...
check_machine
