~kris/dots

srice

ref: e98f3b030dc24445bd55c68d95d2d81933fd68b3 srice/.local/bin/misc/vroid -rw-r--r-- 1.0 KiB
e98f3b03 — Kris Yotam chore: sync local state after restore (push updates, no pull) a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh

PREFIX="/home/krisyotam/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/compatdata/1486350/pfx/drive_c/users/steamuser/Documents/vroid"

if [ $# -eq 0 ]; then
    echo "Usage: vroid <file.vroid> [file2.vroid ...]"
    echo ""
    echo "Copies .vroid files into the VRoid Studio Proton prefix."
    echo "Destination: C:\\users\\steamuser\\Documents\\vroid\\"
    echo ""
    echo "Current files in prefix:"
    ls "$PREFIX" 2>/dev/null || echo "  (none)"
    exit 0
fi

mkdir -p "$PREFIX"

for file in "$@"; do
    if [ ! -f "$file" ]; then
        echo "File not found: $file"
        continue
    fi

    name=$(basename "$file")

    if [ -f "$PREFIX/$name" ]; then
        printf "'%s' already exists in prefix. Overwrite? [y/N] " "$name"
    else
        printf "Copy '%s' into VRoid prefix? [Y/n] " "$name"
    fi

    read -r answer
    case "$answer" in
        [nN]) echo "Skipped." ;;
        *)
            cp "$file" "$PREFIX/$name"
            echo "Copied -> C:\\users\\steamuser\\Documents\\vroid\\$name"
            ;;
    esac
done