Created
August 13, 2020 12:14
-
-
Save toshia/26fc25a872d6d0c972f73a17d988d192 to your computer and use it in GitHub Desktop.
RimWorld1.1のままプレイするためにバージョンを固定したMODのなかで、ワークショップで1.1と1.2両対応のバージョンがリリースされたやつだけ固定を解除するスクリプト
This file contains hidden or 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/fish | |
# Steam Workshop mods | |
# ~/.steam/steam/steamapps/workshop/content/294100/ | |
# manual-installed mods | |
# ~/.steam/steam/steamapps/common/RimWorld/Mods/ | |
for i in ~/.steam/steam/steamapps/workshop/content/294100/* | |
if [ -f $i/About/About.xml ] && [ -f ~/.steam/steam/steamapps/common/RimWorld/Mods/(basename $i)/About/About.xml ] | |
#echo $i | |
set name (cat $i/About/About.xml | xmllint --xpath "//ModMetaData/name/text()" -) | |
set target_version (cat $i/About/About.xml | xmllint --xpath "//ModMetaData/supportedVersions/li/text()" -) | |
if contains '1.1' $target_version && contains '1.2' $target_version | |
echo -n "delete" $name "("$i"): " | |
echo $target_version | |
rm -rf ~/.steam/steam/steamapps/common/RimWorld/Mods/(basename $i) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment