Hi new to unix and bash programming. I am trying to make a simple startup script to have my boxee start up XBMC that is stored on a Memory card. I can start the commands by entering them in telnet, but if i call the test.sh script it wont allow me to access the directory where XBMC is stored on.
#!/tmp/mnt/6337-3533/xbmc
BASEDIR=/tmp/mnt/6337-3533/xbmc $0
killall U99boxee; killall BoxeeLauncher; killall run_boxee.sh; killall Boxee; killall BoxeeHal
GCONV_PATH=$PWD/gconv AE_ENGINE=active PYTHONPATH=$PWD/python2.7:$PWD/python2.7/lib-dynload XBMC_HOME=$PWD ./xbmc.bin -p
gives:
# sh test.sh
: not foundne 2:
: not foundne 3:
test.sh: line 4: /tmp/mnt/6337-3533/xbmc: Permission denied
: not foundne 5:
: not foundne 6:
killall: U99boxee: no process killed
killall: BoxeeLauncher: no process killed
killall: run_boxee.sh: no process killed
killall: Boxee: no process killed
: no process killed
: not foundne 9:
: not foundne 10:
test.sh: line 11: ./xbmc.bin: not found
#
i used the command line from xbmc. and i assume the $PWD expects the script to be in /tmp/mnt/6337-3533/xbmc
if I enter "cd /tmp/mnt/6337-3533/xbmc" in telnet it wil bring me to the dir but if i put that code in the script, it will give me access denied.
What am i doing wrong here. or how can i approach this so i wont have to change my work directory?