daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Oct 12th, 2011 18 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1 #!/bin/bash
  2.   2
  3.   3 alternatives_path="/etc/alternatives"
  4.   4 tool_bin="/home/user/tools/bin"
  5.   5
  6.   6 for file in $( ls $1 );
  7.   7 do
  8.   8    
  9.   9 #
  10.  10 # apparently there are quite some differences between 1.14.31 (lenny) and 1.15.8.11 (squeeze)
  11.  11
  12.  12 # todo:
  13.  13 #   check if --log is supported,
  14.  14 #       send log to /var/log/update-alternatives
  15.  15 #   check exit status of /usr/bin/update-alternatives
  16.  16 #       what for? what do we wanna catch?
  17.  17 #  
  18.  18     /usr/bin/update-alternatives --quiet --install $tools_bin/$file $file $1/$file 10 &> /dev/null;
  19.  19     if [ -e $alternatives_path/$file.dpkg-tmp ]; then
  20.  20         mv $alternatives_path/$file.dpkg-tmp $alternatives_path/$file;
  21.  21     fi;
  22.  22
  23.  23 done
  24.  24    
  25.  25    
  26.  
  27.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top