runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

upgrade (760B)


      1 #!/bin/sh
      2 set -e
      3 
      4 umask 022
      5 test -d package || sh -cx '! : Wrong working directory.'
      6 test -d src || sh -cx '! : Wrong working directory.'
      7 
      8 here=`env - PATH=$PATH pwd`
      9 parent=`dirname $here`
     10 
     11 echo 'Creating symlink runit -> runit-2.1.2...'
     12 rm -f runit
     13 ln -s runit-2.1.2 runit
     14 mv -f runit ..
     15 
     16 echo 'Making command links in /command...'
     17 mkdir -p /command
     18 for i in `cat package/commands`; do
     19   rm -f /command/$i'{new}'
     20   ln -s $parent/runit/command/$i /command/$i'{new}'
     21   mv -f /command/$i'{new}' /command/$i
     22 done
     23 echo 'Making compatibility links in /usr/local/bin...'
     24 mkdir -p /usr/local/bin
     25 for i in `cat package/commands`; do
     26   rm -f /usr/local/bin/$i'{new}'
     27   ln -s /command/$i /usr/local/bin/$i'{new}'
     28   mv -f /usr/local/bin/$i'{new}' /usr/local/bin/$i
     29 done