diff options
author | Michael Larabel <Michael AT phoronix.com> | 2008-05-15 20:03:38 -0400 |
---|---|---|
committer | Michael Larabel <Michael AT phoronix.com> | 2008-05-15 20:03:38 -0400 |
commit | 02790f897f64014f1def7a755e7d017b9a11ee1a (patch) | |
tree | a14af52649ce8de4b0a5b80ceaec0720fdb9bee6 /install-sh | |
parent | 4c37f2b33695afe15fa1e66490c2920c999a5ff2 (diff) | |
download | phoronix-test-suite-upstream-02790f897f64014f1def7a755e7d017b9a11ee1a.tar.gz phoronix-test-suite-upstream-02790f897f64014f1def7a755e7d017b9a11ee1a.tar.xz phoronix-test-suite-upstream-02790f897f64014f1def7a755e7d017b9a11ee1a.zip |
Add support for custom install prefix (first argument supplied to
install-sh over-rides the /usr prefix)
Diffstat (limited to 'install-sh')
-rwxr-xr-x | install-sh | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -2,21 +2,27 @@ # Generic Phoronix Test Suite installer -mkdir -p /usr/bin/ -mkdir -p /usr/share/phoronix-test-suite/ -mkdir -p /usr/share/doc/phoronix-test-suite/ +if [ "X$1" = "X" ] +then + INSTALL_PREFIX="/usr" +else + INSTALL_PREFIX="$1" +fi -cp CHANGE-LOG /usr/share/doc/phoronix-test-suite/ -cp README /usr/share/doc/phoronix-test-suite/ -cp COPYING /usr/share/doc/phoronix-test-suite/ +mkdir -p $INSTALL_PREFIX/bin/ +mkdir -p $INSTALL_PREFIX/share/phoronix-test-suite/ +mkdir -p $INSTALL_PREFIX/share/doc/phoronix-test-suite/ -cp LICENSE /usr/share/phoronix-test-suite/ -cp -r pts/ /usr/share/phoronix-test-suite/ -rm -f /usr/share/phoronix-test-suite/pts/etc/scripts/package-build-* -cp -r pts-core/ /usr/share/phoronix-test-suite/ +cp CHANGE-LOG $INSTALL_PREFIX/share/doc/phoronix-test-suite/ +cp README $INSTALL_PREFIX/share/doc/phoronix-test-suite/ +cp COPYING $INSTALL_PREFIX/share/doc/phoronix-test-suite/ -cp phoronix-test-suite /usr/bin/phoronix-test-suite -sed -i 's/PTS_DIR=`pwd`/PTS_DIR=\/usr\/share\/phoronix-test-suite\//g' /usr/bin/phoronix-test-suite -chmod +x /usr/bin/phoronix-test-suite +cp LICENSE $INSTALL_PREFIX/share/phoronix-test-suite/ +cp -r pts/ $INSTALL_PREFIX/share/phoronix-test-suite/ +rm -f $INSTALL_PREFIX/share/phoronix-test-suite/pts/etc/scripts/package-build-* +cp -r pts-core/ $INSTALL_PREFIX/share/phoronix-test-suite/ -echo "Phoronix Test Suite Installed: /usr/bin/phoronix-test-suite" +sed 's:PTS_DIR=`pwd`:PTS_DIR='"$INSTALL_PREFIX"'\/share\/phoronix-test-suite:g' phoronix-test-suite > $INSTALL_PREFIX/bin/phoronix-test-suite +chmod +x $INSTALL_PREFIX/bin/phoronix-test-suite + +echo "Phoronix Test Suite Installed: $INSTALL_PREFIX/bin/phoronix-test-suite" |