Adjust copy-mods.sh to copy the contents.pak from mods

This commit is contained in:
2024-11-12 19:18:41 +01:00
parent 4d25889ba7
commit 64ff4b5c7d
+8 -1
View File
@@ -1,5 +1,12 @@
#!/bin/bash
echo "Copying mods from /starbound/steamapps/workshop/content/211820/ to /starbound/mods/"
rsync -a --info=progress2 /starbound/steamapps/workshop/content/211820/ /starbound/mods/
# Loop through each mod directory and copy the contents.pak file, renaming it to mod_id.pak
for mod_dir in /starbound/steamapps/workshop/content/211820/*; do
if [ -d "$mod_dir" ]; then
mod_id=$(basename "$mod_dir")
echo Installing $mod_id
rsync -a "$mod_dir/contents.pak" "/starbound/mods/${mod_id}.pak"
fi
done
echo "Finished"