File: module-options

package info (click to toggle)
alsa-driver 1.0.8-7sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 15,840 kB
  • ctags: 43,253
  • sloc: ansic: 257,429; sh: 18,021; makefile: 1,741; perl: 1,316; python: 1,280; xml: 448; awk: 66
file content (24 lines) | stat: -rwxr-xr-x 415 bytes parent folder | download | duplicates (5)
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/bash

if [ -z "$1" ]; then
  file=/etc/modules.conf
else
  file=$1
fi

if [ ! -f $file ]; then
    echo "file $file not found"
    exit 1
fi

rm -f $file.new
sed -e 's/snd_//g' < $file > $file.new
if cmp -s $file $file.new; then
    # nothing changed
    rm -f $file.new
    echo "Nothing to be changed."
else
    diff -u $file $file.new | less
    echo "Please, check and copy $file.new to $file"
fi
exit 0