Files
EasySoft-ZenTaoPMS/bin/shell/setpath.sh
2013-01-09 03:09:42 +00:00

22 lines
444 B
Bash
Executable File

#!/bin/bash
echo "Input the path PHP:"
read phpPath
filelist=$(ls ./)
if [ -f $phpPath ]; then
phpPath=${phpPath//\//\\\/}
for filename in $filelist
do
if [ $0 != ./$filename ]; then
echo "Change ./$filename"
sed -i "1,2s/^[^ ]*php[^ ]* /$phpPath /g" ./$filename
fi
done
echo "Change ../ztcli.sh"
sed -i "1,2s/^[^ ]*php[^ ]* /$phpPath /g" ../ztcli.sh
echo "Success"
else
echo "Error path for PHP"
fi
exit 0