#!/bin/sh set -e P=gbw-node V=1 cd /package/$P-$V # Versioned path duplicated in: # package/README echo "Creating symlink $P -> $P-$V" rm -f /package/$P'{new}' ln -s $P-$V /package/$P'{new}' mv -f /package/$P'{new}' /package/$P echo 'Making command links in /command' mkdir -p /command for i in `cat package/commands` ; do chmod 755 command/$i rm -f /command/$i'{new}' ln -s /package/$P/command/$i /command/$i'{new}' mv -f /command/$i'{new}' /command/$i done