mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-14 13:30:34 +00:00
update
This commit is contained in:
parent
3936d7e67c
commit
1c12a26076
@ -40,67 +40,67 @@ mappings="$user/Controls/Mappings"
|
|||||||
if [ "$i_changed_these" = "false" ]; then
|
if [ "$i_changed_these" = "false" ]; then
|
||||||
echo "Before you run this script, edit it and change"
|
echo "Before you run this script, edit it and change"
|
||||||
echo -e "the default paths to match your configuration!\n"
|
echo -e "the default paths to match your configuration!\n"
|
||||||
read -n 1 -s -p "Press any key to continue, or Ctrl-c to quit..."
|
read -n 1 -s -p "Press any key to exit..."
|
||||||
echo -e "\n----------------------------------------------------------------\n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Sanity checks
|
|
||||||
if [ ! -d "$prefix" ]; then
|
|
||||||
echo "Invalid path: $prefix"
|
|
||||||
echo "Aborting"
|
|
||||||
elif [ ! -d "$path" ]; then
|
|
||||||
echo "Invalid path: $path"
|
|
||||||
echo "Aborting"
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# Prompt user to back up the current keybinds in the game
|
|
||||||
echo "Before proceeding, please be sure you have"
|
|
||||||
echo -e "made a backup of your Star Citizen keybinds!\n"
|
|
||||||
echo "To do this from within the game, go to"
|
|
||||||
echo -e "Options->Keybindings->Control Profiles->Save Control Settings\n"
|
|
||||||
echo "Give it a name and save it to the backup location"
|
|
||||||
echo -e "that you specified in this script's variables\n"
|
|
||||||
read -n 1 -s -p "Press any key to continue, or Ctrl-c to quit..."
|
|
||||||
echo -e "\n----------------------------------------------------------------\n"
|
echo -e "\n----------------------------------------------------------------\n"
|
||||||
|
# Sanity checks
|
||||||
# Check for exported keybind files
|
if [ ! -d "$prefix" ]; then
|
||||||
exported=0 # Default to none found
|
echo "Invalid path: $prefix"
|
||||||
if [ ! -d "$mappings" ] || [ -z "$(ls -A $mappings)" ]; then
|
echo "Aborting"
|
||||||
echo "Warning: No exported keybindings found. Keybinds will not be backed up!"
|
elif [ ! -d "$path" ]; then
|
||||||
exported=0
|
echo "Invalid path: $path"
|
||||||
|
echo "Aborting"
|
||||||
else
|
else
|
||||||
exported=1
|
|
||||||
fi
|
# Prompt user to back up the current keybinds in the game
|
||||||
|
echo "Before proceeding, please be sure you have"
|
||||||
|
echo -e "made a backup of your Star Citizen keybinds!\n"
|
||||||
|
echo "To do this from within the game, go to"
|
||||||
|
echo -e "Options->Keybindings->Control Profiles->Save Control Settings\n"
|
||||||
|
echo "Give it a name and save it to the backup location"
|
||||||
|
echo -e "that you specified in this script's variables\n"
|
||||||
|
read -n 1 -s -p "Press any key to continue, or Ctrl-c to quit..."
|
||||||
|
echo -e "\n----------------------------------------------------------------\n"
|
||||||
|
|
||||||
# Back up keybinds
|
# Check for exported keybind files
|
||||||
if [ "$exported" -eq 1 ]; then
|
exported=0 # Default to none found
|
||||||
echo "Backing up all saved keybinds..."
|
if [ ! -d "$mappings" ] || [ -z "$(ls -A $mappings)" ]; then
|
||||||
mkdir -p "$backups" && cp -r "$mappings/." "$backups/"
|
echo "Warning: No exported keybindings found. Keybinds will not be backed up!"
|
||||||
|
exported=0
|
||||||
|
else
|
||||||
|
exported=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Back up keybinds
|
||||||
|
if [ "$exported" -eq 1 ]; then
|
||||||
|
echo "Backing up all saved keybinds..."
|
||||||
|
mkdir -p "$backups" && cp -r "$mappings/." "$backups/"
|
||||||
|
echo -e "Done.\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Wipe the user directory
|
||||||
|
echo "Wiping USER directory..."
|
||||||
|
rm -rf "$user"
|
||||||
echo -e "Done.\n"
|
echo -e "Done.\n"
|
||||||
|
|
||||||
|
# Restore custom keybinds
|
||||||
|
if [ "$exported" -eq 1 ]; then
|
||||||
|
echo "Restoring keybinds..."
|
||||||
|
mkdir -p "$mappings" && cp -r "$backups/." "$mappings/"
|
||||||
|
echo -e "Done.\n"
|
||||||
|
echo "*NOTE*"
|
||||||
|
echo "To re-import your keybinds, select it in-game from the list:"
|
||||||
|
echo -e "Options->Keybindings->Control Profiles\n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Special request: Uncomment to wash Snagletooth's car
|
||||||
|
#echo -e "Washing the car...\n"
|
||||||
|
#echo "Working at the car wash, yeah!"
|
||||||
|
#echo "Come on and sing it with me, car wash!"
|
||||||
|
#echo -e "Sing it with the feeling now, car wash yeah!\n"
|
||||||
|
|
||||||
|
echo "And we're done here. Have fun!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Wipe the user directory
|
|
||||||
echo "Wiping USER directory..."
|
|
||||||
rm -rf "$user"
|
|
||||||
echo -e "Done.\n"
|
|
||||||
|
|
||||||
# Restore custom keybinds
|
|
||||||
if [ "$exported" -eq 1 ]; then
|
|
||||||
echo "Restoring keybinds..."
|
|
||||||
mkdir -p "$mappings" && cp -r "$backups/." "$mappings/"
|
|
||||||
echo -e "Done.\n"
|
|
||||||
echo "*NOTE*"
|
|
||||||
echo "To re-import your keybinds, select it in-game from the list:"
|
|
||||||
echo -e "Options->Keybindings->Control Profiles\n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Special request: Uncomment to wash Snagletooth's car
|
|
||||||
#echo -e "Washing the car...\n"
|
|
||||||
#echo "Working at the car wash, yeah!"
|
|
||||||
#echo "Come on and sing it with me, car wash!"
|
|
||||||
#echo -e "Sing it with the feeling now, car wash yeah!\n"
|
|
||||||
|
|
||||||
echo "And we're done here. Have fun!"
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user