From 1c12a2607671381559bbb2bfdc1e7a687301b80f Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Thu, 24 Oct 2019 00:34:52 -0400 Subject: [PATCH] update --- housekeeping/sc-sanitation.sh | 114 +++++++++++++++++----------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/housekeeping/sc-sanitation.sh b/housekeeping/sc-sanitation.sh index ceba71e..ba4ef53 100644 --- a/housekeeping/sc-sanitation.sh +++ b/housekeeping/sc-sanitation.sh @@ -40,67 +40,67 @@ mappings="$user/Controls/Mappings" if [ "$i_changed_these" = "false" ]; then echo "Before you run this script, edit it and change" 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..." - 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" + read -n 1 -s -p "Press any key to exit..." 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" - - # Check for exported keybind files - exported=0 # Default to none found - if [ ! -d "$mappings" ] || [ -z "$(ls -A $mappings)" ]; then - echo "Warning: No exported keybindings found. Keybinds will not be backed up!" - exported=0 + # Sanity checks + if [ ! -d "$prefix" ]; then + echo "Invalid path: $prefix" + echo "Aborting" + elif [ ! -d "$path" ]; then + echo "Invalid path: $path" + echo "Aborting" 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 - if [ "$exported" -eq 1 ]; then - echo "Backing up all saved keybinds..." - mkdir -p "$backups" && cp -r "$mappings/." "$backups/" + # Check for exported keybind files + exported=0 # Default to none found + if [ ! -d "$mappings" ] || [ -z "$(ls -A $mappings)" ]; then + 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" + + # 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 - - # 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