mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-26 16:28:28 +00:00
remove-mods removes mods from workshop directory
This commit is contained in:
parent
cbe5e2ea50
commit
06e1c19044
@ -1672,6 +1672,26 @@ doUninstallMod(){
|
|||||||
fi
|
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
|
# Copies server state to a backup directory
|
||||||
#
|
#
|
||||||
@ -2125,6 +2145,7 @@ while true; do
|
|||||||
useconfig) nrarg=1; ;;
|
useconfig) nrarg=1; ;;
|
||||||
install-cronjob) nrarg=1; ;;
|
install-cronjob) nrarg=1; ;;
|
||||||
remove-cronjob) nrarg=1; ;;
|
remove-cronjob) nrarg=1; ;;
|
||||||
|
remove-mods) nrarg=1; ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Enumerate the options and arguments
|
# Enumerate the options and arguments
|
||||||
@ -2181,6 +2202,10 @@ while true; do
|
|||||||
defaultinstance="${args[0]}"
|
defaultinstance="${args[0]}"
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
remove-mods)
|
||||||
|
doRemoveMods "${args[0]}"
|
||||||
|
continue
|
||||||
|
;;
|
||||||
list-instances)
|
list-instances)
|
||||||
doListAllInstances "${options[@]}"
|
doListAllInstances "${options[@]}"
|
||||||
exit
|
exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user