File: ultrafix.sh

package info (click to toggle)
ocp 1:0.1.21-5
  • links: PTS
  • area: main
  • in suites: bullseye, buster
  • size: 5,528 kB
  • sloc: ansic: 91,461; cpp: 9,729; sh: 3,119; makefile: 2,493
file content (17 lines) | stat: -rwxr-xr-x 577 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# OpenCP Module Player
# copyright (c) '94-'05 Niklas Beisert <nbeisert@physik.tu-muenchen.de>
#
# ultrafix.sh - Fixed ULTRASOUND.INI files
#
# revision history: (please note changes here)
#  -ss050206   Stian Skjelstad <stian@nixia.no>
#    -first release

if [ -z "$2" ] || [ -n "$3" ]; then
	echo -e "Usage:\n$0 /path/to/ULTRASOUND.INI /path/to/pat/files"
else
	tmp=`echo $2|sed -e 's/\\//\\\\\\//g;s/.*/&\\\\\//;s/\\\\\/\\\\\/$/\\\\\//'`
	sed -e 's/\r//;s/[0-9]=.*/\U&/;s/PatchDir\=.*/PatchDir\='$tmp'/' "$1" > /tmp/ULTRASOUND.INI
	mv /tmp/ULTRASOUND.INI $1
fi