Last active
May 1, 2020 13:58
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.