i want to make a .lin script that activates (add to startup folder) or deactivates (remove from startup folder) another file.
The problem is that this test:
Quote:
|
[-e /mmc/mmca1/startup/poweronlog.lin]
|
has some certain problem because it always returns false so it always showing "Activate" instead of switching between "Activate" and "Deactivate" (the functionallity is the same.. always does the activation process.. never went through the other side of the if statement)
here's the script:
Quote:
#!/bin/bash
if [-e /mmc/mmca1/startup/poweronlog.lin];
then
buton="Deactivate"
else
buton="Activate"
fi
mmsg=`showQ -t30 -1 $buton -2 "Cancel" -m "PowerOn phone time logger"`
if [ "$mmsg" = "0" ]
then
if [-e /mmc/mmca1/startup/poweronlog.lin] then
mv /mmc/mmca1/startup/poweronlog.lin /mmc/mmca1/startup/inactive/
else
mv /mmc/mmca1/startup/inactive/poweronlog.lin /mmc/mmca1/startup/
fi
exit
fi
if [ "$mmsg" = "1" ]
then
exit
fi
|