File: cdripper.sh

package info (click to toggle)
yquake2 5.21~dfsg1-2
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd
  • size: 3,448 kB
  • ctags: 12,967
  • sloc: ansic: 95,860; makefile: 567; sh: 51
file content (24 lines) | stat: -rwxr-xr-x 526 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -eu

# simple script that rips CDs to a format useable by Yamagis Quake2 client
# Needs cdparanoia and oggenc, useable with Quake II and both addons.

# Create directory
mkdir -p music
cd music

# rip all tracks beginning with second one (the first track is data)
cdparanoia -B "2-"

for I in track*.cdda.wav; do
    NUM="${I#track}"
    NUM="${NUM%.cdda.wav}"
    oggenc -q 6 -o "$NUM.ogg" "$I"
done

# remove .wav files
rm *.wav

echo '
Ripping done, move music/ directory to /your/path/to/quake2/game/music/'