[Linux Guide] Adding FTL to your path
Posted: Sat Sep 15, 2012 11:59 pm
In order to run the FTL script without having to cd into the FTL folder it can be modified by adding the following lines:
Heres the full script with modification:
Then in order to add the FTL script to your path you can symlink the script to your local ~/bin directory.
Now to test it just change to your home directory and type FTL
If it launches then your all set otherwise you'll need to check to make sure your ~/bin directory is in your path.
I won't go into how to set your PATH, just google it.
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.