Skip to content
Snippets Groups Projects
Commit dbe00bb6 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

no more need to indicate script location in alias or anywhere

parent c869d844
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#configure working directories
export workingDirectory="/where/gamepad-switcher/is"
export killProcessesScript="a/shell/file/that/will/be/created/and/erased/in/working/directory"
\ No newline at end of file
export killProcessesScript="killControllers.sh"
\ No newline at end of file
......@@ -4,8 +4,10 @@
# 2 → name of the game as suggested in menu
#configuration
. ./config.sh
export workingDirectory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
#(thanks http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in)
cd $workingDirectory
. ./config.sh
if [ -e "$killProcessesScript" ]
then
echo "There seems to be (a) running instance(s) of the game controller, do you want to brutally kill the processes? (Y/n)\nI'm not sure what it does if you don't…"
......
......@@ -2,4 +2,4 @@ This is a gamepad module switching script intended for use with the Microsoft Xb
To permanently add an alias add the following line to ~/.bash_aliases (if the file does not exist, simply create one) and substitute the name and path as necessary:
alias <name_of_alias>="cd /path/to/this/folder && ./game.sh && cd -"
alias <name_of_alias>="/path/to/this/folder/game.sh"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment