Code: Select all
# change to directory of script
here="$(dirname "$(readlink -f "$(which "$0")")")"
cd "$here"
Heres the full script with modification:
Code: Select all
#!/bin/bash
# change to directory of script
here="$(dirname "$(readlink -f "$(which "$0")")")"
cd "$here"
# enter the game directory
cd ./data
# run FTL
./FTL "$@"
Then in order to add the FTL script to your path you can symlink the script to your local ~/bin directory.
Code: Select all
cd ~/bin/
ln -s [path to FTL script] FTL
Now to test it just change to your home directory and type FTL
Code: Select all
cd ~
FTL
If it launches then your all set otherwise you'll need to check to make sure your ~/bin directory is in your path.
Code: Select all
echo $PATH
I won't go into how to set your PATH, just google it.