Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # create_virtual_directories.sh
- # Mod Organizer configuration file for mod install order
- modlist='/home/zixaphir/Games/mod-organizer-2/ModOrganizer2/profiles/Default/modlist.txt'
- # Directory containing mods, each mod is a subdirectory
- modsdir='/home/zixaphir/Games/mod-organizer-2/ModOrganizer2/mods/'
- # Directory containing original Skyrim data folder
- # Renamed because I'm not sure OverlayFS can mount over existing data?
- dirs='/home/zixaphir/Games/SteamLibrary/steamapps/common/Skyrim Special Edition/Data_orig/'
- # Read the modslist. Enabled mods are the directory names, prefixed with a
- # symbol, `#` meaning unmanaged, `*` meaning disabled, and `+` meaning
- # enabled. We look for the `+`, parse it out, and then assemble a list
- # of directories to use. The modslist uses windows line endings, so those
- # have to be trimmed with sed.
- while read -r line; do
- if [[ $line =~ ^\+ ]]; then
- dirs="${dirs}:$modsdir$(echo $line | sed s/\+// | sed s/\\r//)"
- fi;
- done < $modlist
- # Mount the virtual filesystem, using Mod Organizer's `overwrite` directory
- # as the top level, where all changes to the virtual directory should be
- # dumped. The workdir must be an empty directory that exists on the same
- # host filesystem as the upperdir!!
- sudo mount -t overlay overlay -o \
- lowerdir="$dirs",\
- upperdir="/home/zixaphir/Games/mod-organizer-2/ModOrganizer2/overwrite",\
- workdir="/home/zixaphir/Games/vfs_working" \
- "/home/zixaphir/Games/SteamLibrary/steamapps/common/Skyrim Special Edition/Data/"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement