Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rafaelrpinto
Last active May 1, 2020 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rafaelrpinto/1d610ede0e3b8b46e6c8c7a77def8a97 to your computer and use it in GitHub Desktop.
Save rafaelrpinto/1d610ede0e3b8b46e6c8c7a77def8a97 to your computer and use it in GitHub Desktop.
Script that moves incorrect Killing Floor 1 mutators to the correct folder on Linux (fix perk progress reset issue)
#!/bin/bash
# Folder where the incorrect downloaded mutators are
CACHE_FOLDER=~/.killingfloor/Cache
# Folder where they should be after renamed
STEAM_SYSTEM_FOLDER=~/.steam/steamapps/common/KillingFloor/System
cd $CACHE_FOLDER
while read p; do
# For each non-empty entry of cache.ini
if [ -n "$p" ]
then
IFS='=' read -r -a array <<< "$p"
echo "${array[0]}.uxx"
echo "${array[1]}"
# Move the file to the steam folder with the correct name
mv $CACHE_FOLDER/"${array[0]}.uxx" $STEAM_SYSTEM_FOLDER/${array[1]}
fi
done < cache.ini
# Erase the previous values from the cache.ini file
echo "[Cache]" > cache.ini
@rafaelrpinto
Copy link
Author

This was tested on Ubuntu 18.04 and after running it the perks are saved. just make sure to run it every time you download an addon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment