Jo Jerrica Decker
7 years ago
1 changed files with 50 additions and 0 deletions
@ -0,0 +1,50 @@ |
|||
#!/bin/bash |
|||
|
|||
echo "Track linker for Quake II Quad Damage (GOG edition)" |
|||
|
|||
baseq2=("baseq2" 10 2 3 4 5 6 7 8 9 10 11) |
|||
xatrix=("xatrix" 10 9 13 14 7 16 2 15 3 4 18) |
|||
raven=("raven" 10 12 13 14 15 16 17 18 19 20 21) |
|||
|
|||
games=(baseq2[@] xatrix[@] raven[@]) |
|||
|
|||
for g in ${games[@]}; do |
|||
eval current_game=($g) |
|||
title=${!current_game:0:1} |
|||
trackcount=${!current_game:1:1} |
|||
|
|||
echo "==============================" |
|||
echo "==============================" |
|||
|
|||
echo "Current game: $title" |
|||
echo "Number of tracks: $trackcount" |
|||
|
|||
echo "==============================" |
|||
|
|||
echo "Creating "$title/music" (if not present)..." |
|||
mkdir -p "$title/music" |
|||
|
|||
|
|||
echo "Creating track links..." |
|||
echo "------------------------------" |
|||
cd "$title/music" |
|||
|
|||
for ((t = 2; t<trackcount+2; t++)); do |
|||
TARGET=$(printf "%02d" ${!current_game:t:1}) |
|||
LINK_NAME=$(printf "%02d" $t) |
|||
|
|||
echo ">> Track $LINK_NAME -> $TARGET..." |
|||
|
|||
ln -s ../../music/$TARGET.ogg $LINK_NAME.ogg |
|||
done |
|||
|
|||
echo "------------------------------" |
|||
echo "------------------------------" |
|||
|
|||
cd ../.. |
|||
|
|||
echo "Successfully linked $title!" |
|||
done |
|||
|
|||
echo "All done! Now get fraggin'! :D" |
|||
exit 0 |
Loading…
Reference in new issue