--- create_bootstrap.sh | 14 +++++++------- header.txt | 16 ++++++++++------ 2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/create_bootstrap.sh b/create_bootstrap.sh index 42478ea..8dcb01f 100755 --- a/create_bootstrap.sh +++ b/create_bootstrap.sh @@ -34,7 +34,7 @@ if [ "$ERTS_PATH" = "" ];then fi echo "Path to Erts: $ERTS_PATH" -ERTS_VSN=$(basename $ERTS_PATH | sed 's/erts-//') +ERTS_VSN=`basename $ERTS_PATH | sed 's/erts-//'` if [ "$ERTS_VSN" != "$TARGET_ERTS_VSN" ];then echo "Erts version must be $TARGET_ERTS_VSN. You supplied $ERTS_VSN." @@ -44,22 +44,22 @@ fi mkdir erlware cd erlware cp ../bootstrap.tar.gz . -tar -zxf bootstrap.tar.gz +gzip -dc bootstrap.tar.gz | tar xf - rm bootstrap.tar.gz INSTALLED_ERTS_PATH="./packages/$ERTS_VSN/erts-$ERTS_VSN" cp -r $ERTS_PATH $INSTALLED_ERTS_PATH; or_exit $? "erts copy failed" rm $INSTALLED_ERTS_PATH/bin/dialyzer rm $INSTALLED_ERTS_PATH/bin/erl -tar -zcf contents.tar.gz * +tar cf - * | gzip -c9 > contents.tar.gz mv contents.tar.gz .. -cd - +cd .. rm -rf erlware -MACHINE=$(uname -m | sed 's/ /-/') -KERNEL=$(uname -s | sed 's/ /-/') +MACHINE=`uname -m | sed 's/ /-/'` +KERNEL=`uname -s | sed 's/ /-/'` -KERNEL_VSN=$(uname -r | sed -e 's;-.*;;') +KERNEL_VSN=`uname -r | sed -e 's;-.*;;'` FILENAME=faxien-launcher-$MACHINE-$KERNEL-$KERNEL_VSN-$CURRENT_BOOTSTRAPPER_VSN.sh cat header.txt > $FILENAME diff --git a/header.txt b/header.txt index ebe2864..6ec91ee 100644 --- a/header.txt +++ b/header.txt @@ -1,12 +1,15 @@ #!/bin/sh # create a directory to extract to. -export PREFIX="/usr/local/erlware" +PREFIX="/usr/local/erlware" +export PREFIX if [ "$1" != "" ]; then if [ "`basename $1`" = "erlware" ]; then - export PREFIX="$1" + PREFIX="$1" + export PREFIX else - export PREFIX="$1/erlware" + PREFIX="$1/erlware" + export PREFIX fi else echo "" @@ -15,7 +18,7 @@ else echo "" fi -if [ -e $PREFIX ];then +if [ -f $PREFIX ];then echo "$PREFIX already exists" echo "Would you like to delete it? Answer [y|N] $> \c" read RESP @@ -55,13 +58,14 @@ echo "Error executing mkdir, do you have permission?" exit 1 fi -export PREFIX=$(cd $PREFIX; pwd) +PREFIX=`cd $PREFIX; pwd` +export PREFIX echo Untaring into $PREFIX # Take the TGZ portion of this file and pipe it to tar. tail -n +$SKIP $0 > $PREFIX/tmp.tar.gz -(cd $PREFIX; tar -zxf tmp.tar.gz) +(cd $PREFIX; gzip -dc tmp.tar.gz | tar xf -) rm $PREFIX/tmp.tar.gz if [ $? != 0 ]; then -- 1.6.0.6 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "erlware-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/erlware-dev?hl=en -~----------~----~----~----~------~----~------~--~---
