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

colors and empty BOI

parent 038870c1
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,20 @@ ...@@ -4,6 +4,20 @@
# 2 → name of the game as suggested in menu # 2 → name of the game as suggested in menu
#configuration #configuration
#colors
prompt='\033[1;34;40m'
answer='\033[0;32m'
info='\033[0;33m'
choice='\033[1;37;40m'
mistake='\033[0;31m'
normal='\033[0m'
export prompt
export answer
export info
export choice
export mistake
export normal
#where are we ?
export workingDirectory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/" export workingDirectory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
#(thanks http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in) #(thanks http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in)
cd $workingDirectory cd $workingDirectory
...@@ -12,8 +26,8 @@ echo "Proove you are root…" ...@@ -12,8 +26,8 @@ echo "Proove you are root…"
sudo sleep 0.1 sudo sleep 0.1
if [ -e "$killProcessesScript" ] if [ -e "$killProcessesScript" ]
then then
echo "There seems to be (a) running instance(s) of the game controller, do you want to brutally kill the processes? (Y/n)" echo -e "$prompt There seems to be (a) running instance(s) of the game controller, do you want to brutally kill the processes? $info($choice""Y$info/$choice""n$info)$answer"
echo "I'm not sure what it does if you don't…" echo -e "$info I'm not sure what it does if you don't…$answer"
read userinput read userinput
if [ "$userinput" = "Y" -o "$userinput" = "y" ] if [ "$userinput" = "Y" -o "$userinput" = "y" ]
then then
...@@ -22,11 +36,12 @@ then ...@@ -22,11 +36,12 @@ then
sleep 1 sleep 1
fi fi
fi fi
printf $normal
if [ $# = 0 ] if [ $# = 0 ]
then then
echo "(X)box or (P)S3 ?" echo -e "$prompt($choice""X$prompt)box or ($choice""P$prompt)S3 ?$answer"
read userinput read userinput
printf $normal
else else
userinput="$1" userinput="$1"
fi fi
...@@ -41,7 +56,7 @@ then ...@@ -41,7 +56,7 @@ then
echo "Xbox it is" echo "Xbox it is"
else else
pad="" pad=""
echo "Whatever" echo -e "$mistake""Whatever"
fi fi
export pad export pad
...@@ -50,21 +65,23 @@ then ...@@ -50,21 +65,23 @@ then
userinput=$2 userinput=$2
else else
# Give a list of available games # Give a list of available games
echo What game would you like to play? echo -e "$prompt"What game would you like to play?$info
echo 1\) vvvvvv echo -e "$choice"1"$info"\) "$choice"v"$info"vvvvv
echo 2\) Braid echo -e "$choice"2"$info"\) "$choice"B"$info"raid
echo 3\) Eggnogg echo -e "$choice"3"$info"\) "$choice"E"$info"ggnogg
echo 4\) Metal Slug echo -e "$choice"4"$info"\) "$choice"M"$info"etal Slug
echo 5\) Dustforce echo -e "$choice"5"$info"\) "$choice"D"$info"ustforce
echo 6\) Hotline Miami 2: Wrong Number echo -e "$choice"6"$info"\) "$choice"H"$info"otline "$choice"M"$info"iami "$choice"2"$info": Wrong Number
echo 93\) Limbo echo -e "$choice"7"$info"\) The "$choice"B"$info"inding "$choice"o"$info"f "$choice"I"$info"saac: Wrath of the Lamb
echo 94\) Lone Survivor echo -e "$choice"93"$info"\) Limbo
echo 95\) Minecraft echo -e "$choice"94"$info"\) Lone Survivor
echo 96\) Psychonauts echo -e "$choice"95"$info"\) Minecraft
echo 97\) Amnesia echo -e "$choice"96"$info"\) Psychonauts
echo "99) None, give me my gamepad mode back." echo -e "$choice"97"$info"\) Amnesia
echo -e "$choice"99"$info"\) "None, give me my gamepad mode back.$answer"
read userinput read userinput
fi fi
printf $normal
# Use basic logic to determine which module to load # Use basic logic to determine which module to load
if [ "$userinput" = 1 -o "$userinput" = "vvvvvv" -o "$userinput" = "Vvvvvv" -o "$userinput" = "v" -o "$userinput" = "V" ] if [ "$userinput" = 1 -o "$userinput" = "vvvvvv" -o "$userinput" = "Vvvvvv" -o "$userinput" = "v" -o "$userinput" = "V" ]
...@@ -73,7 +90,7 @@ then ...@@ -73,7 +90,7 @@ then
echo echo
cd modules cd modules
./vvvvvv.sh ./vvvvvv.sh
elif [ "$userinput" = 2 -o "$userinput" = "Braid" -o "$userinput" = "braid" ] elif [ "$userinput" = 2 -o "$userinput" = "Braid" -o "$userinput" = "braid" -o "$userinput" = "B" -o "$userinput" = "b" ]
then then
echo "Your controller will now be configured for Braid." echo "Your controller will now be configured for Braid."
echo echo
...@@ -89,24 +106,28 @@ then ...@@ -89,24 +106,28 @@ then
elif [ "$userinput" = 4 -o "$userinput" = "MetalSlug" -o "$userinput" = "metalslug" -o "$userinput" = "metal" -o "$userinput" = "Metal" -o "$userinput" = "m" -o "$userinput" = "M" ] elif [ "$userinput" = 4 -o "$userinput" = "MetalSlug" -o "$userinput" = "metalslug" -o "$userinput" = "metal" -o "$userinput" = "Metal" -o "$userinput" = "m" -o "$userinput" = "M" ]
then then
echo "Your controllerS will now be configured for Metal Slug." echo "Your controllerS will now be configured for Metal Slug."
#Different types of controllers could be configured, but it's not my case so I won't do it ;)
echo echo
cd modules cd modules
./metalslug.sh ./metalslug.sh
elif [ "$userinput" = 5 -o "$userinput" = "Dustforce" -o "$userinput" = "dustforce" -o "$userinput" = "dust" -o "$userinput" = "Dust" -o "$userinput" = "d" -o "$userinput" = "D" ] elif [ "$userinput" = 5 -o "$userinput" = "Dustforce" -o "$userinput" = "dustforce" -o "$userinput" = "dust" -o "$userinput" = "Dust" -o "$userinput" = "d" -o "$userinput" = "D" ]
then then
echo "Your controllerS will now be configured for Dust Force." echo "Your controllerS will now be configured for Dust Force."
#Different types of controllers could be configured, but it's not my case so I won't do it ;)
echo echo
cd modules cd modules
./dustforce.sh ./dustforce.sh
elif [ "$userinput" = 6 -o "$userinput" = "Hotline" -o "$userinput" = "Miami" -o "$userinput" = "hotline" -o "$userinput" = "miami" -o "$userinput" = "hm2" -o "$userinput" = "HM2" ] elif [ "$userinput" = 6 -o "$userinput" = "Hotline" -o "$userinput" = "Miami" -o "$userinput" = "hotline" -o "$userinput" = "miami" -o "$userinput" = "hm2" -o "$userinput" = "HM2" ]
then then
echo "Your controller will now be configured for Hotline Miami 2: Wrong Number." echo "Your controller will now be configured for Hotline Miami 2: Wrong Number."
#Different types of controllers could be configured, but it's not my case so I won't do it ;)
echo echo
cd modules cd modules
./hotlinemiami2.sh ./hotlinemiami2.sh
elif [ "$userinput" = 7 -o "$userinput" = "Binding" -o "$userinput" = "binding" -o "$userinput" = "Isaac" -o "$userinput" = "isaac" -o "$userinput" = "boi" -o "$userinput" = "BoI" -o "$userinput" = "BOI" ]
then
echo "Your controller will now be configured for The Binding of Isaac: Wrath of the Lamb."
cd modules
padconf=$3
export padconf
./bindingofisaac.sh
elif [ "$userinput" = 93 -o "$userinput" = "Limbo" -o "$userinput" = "limbo" ] elif [ "$userinput" = 93 -o "$userinput" = "Limbo" -o "$userinput" = "limbo" ]
then then
echo "Your controller will now be configured for Limbo." echo "Your controller will now be configured for Limbo."
......
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