Created
April 19, 2010 23:10
-
-
Save oldpatricka/371787 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# update-control.sh - update workspace control with new control | |
# | |
# WARNING: This is quick and dirty and may break your install. | |
usage() { | |
echo usage: $0 newcontroldir installdir | |
} | |
if [ "$1xxx" == "xxx" ]; then | |
usage | |
exit | |
fi | |
if [ "$2xxx" == "xxx" ]; then | |
usage | |
exit | |
fi | |
NEW_CONTROL=$1 | |
INSTALL_DIR=$2 | |
echo -n backing up your old install to old.workspace-control.tar.gz... | |
tar czf old.workspace-control.tar.gz /opt/nimbus/ | |
echo done | |
echo -n removing old workspace-control install... | |
rm -Rf $INSTALL_DIR/bin $INSTALL_DIR/lib $INSTALL_DIR/sbin $INSTALL_DIR/share $INSTALL_DIR/src | |
echo done | |
echo -n installing new stuff... | |
cp -r $NEW_CONTROL/bin $NEW_CONTROL/lib $NEW_CONTROL/sbin $NEW_CONTROL/share $NEW_CONTROL/src $INSTALL_DIR/ | |
echo done | |
echo -n fixing permissions... | |
find $INSTALL_DIR/bin $INSTALL_DIR/sbin $INSTALL_DIR/libexec -iname "*sh" -exec chmod 755 {} \; | |
echo done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment