mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-12 19:08:27 +00:00
remove-mods removes mods from workshop directory
This commit is contained in:
parent
cbe5e2ea50
commit
06e1c19044
@ -1672,6 +1672,26 @@ doUninstallMod(){
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Removes mod from steamcmd workshop directory
|
||||
#
|
||||
doRemoveMods(){
|
||||
local modid
|
||||
for modid in ${1//,/ }; do
|
||||
if [ -f "$steamcmdroot/steamapps/workshop/appworkshop_${mod_appid}.acf" ]; then
|
||||
sed -i "/^\\t\\t\"${modid}\"/,/^\\t\\t}/d" "$steamcmdroot/steamapps/workshop/appworkshop_${mod_appid}.acf"
|
||||
fi
|
||||
|
||||
if [ -d "$steamcmdroot/steamapps/workshop/content/${mod_appid}/${modid}" ]; then
|
||||
rm -rf "$steamcmdroot/steamapps/workshop/content/${mod_appid}/${modid}"
|
||||
fi
|
||||
|
||||
if [ -d "$steamcmdroot/steamapps/workshop/downloads/${mod_appid}/${modid}" ]; then
|
||||
rm -rf "$steamcmdroot/steamapps/workshop/downloads/${mod_appid}/${modid}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# Copies server state to a backup directory
|
||||
#
|
||||
@ -2125,6 +2145,7 @@ while true; do
|
||||
useconfig) nrarg=1; ;;
|
||||
install-cronjob) nrarg=1; ;;
|
||||
remove-cronjob) nrarg=1; ;;
|
||||
remove-mods) nrarg=1; ;;
|
||||
esac
|
||||
|
||||
# Enumerate the options and arguments
|
||||
@ -2181,6 +2202,10 @@ while true; do
|
||||
defaultinstance="${args[0]}"
|
||||
continue
|
||||
;;
|
||||
remove-mods)
|
||||
doRemoveMods "${args[0]}"
|
||||
continue
|
||||
;;
|
||||
list-instances)
|
||||
doListAllInstances "${options[@]}"
|
||||
exit
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user