Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #!/bin/bash
- 2
- 3 alternatives_path="/etc/alternatives"
- 4 tool_bin="/home/user/tools/bin"
- 5
- 6 for file in $( ls $1 );
- 7 do
- 8
- 9 #
- 10 # apparently there are quite some differences between 1.14.31 (lenny) and 1.15.8.11 (squeeze)
- 11
- 12 # todo:
- 13 # check if --log is supported,
- 14 # send log to /var/log/update-alternatives
- 15 # check exit status of /usr/bin/update-alternatives
- 16 # what for? what do we wanna catch?
- 17 #
- 18 /usr/bin/update-alternatives --quiet --install $tools_bin/$file $file $1/$file 10 &> /dev/null;
- 19 if [ -e $alternatives_path/$file.dpkg-tmp ]; then
- 20 mv $alternatives_path/$file.dpkg-tmp $alternatives_path/$file;
- 21 fi;
- 22
- 23 done
- 24
- 25
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement