ns-tools

Namespace utilities to reuse Open Source packaging efforts.
git clone git://r-36.net/ns-tools
Log | Files | Refs | README | LICENSE

ns-wrapper-install (262B)


      1 #!/bin/sh
      2 
      3 if [ $# -lt 2 ];
      4 then
      5 	printf "usage: %s ns cmd\n" "$(basename $0)" >&2
      6 	exit 1
      7 fi
      8 
      9 # nsroot is checked by ns-wrapper
     10 nroot="$1"
     11 cmd="$2"
     12 
     13 cmdw="$(ns-wrapper $nroot $cmd)"
     14 [ $? -gt 0 ] && exit 1
     15 
     16 printf "%s\n" "$cmdw" > /bin/$cmd
     17 chmod 755 /bin/$cmd
     18