prepare self-extracting installer using 'makeself'
authorRobin Gareus <robin@gareus.org>
Sun, 28 Sep 2014 19:13:18 +0000 (21:13 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 28 Sep 2014 19:13:18 +0000 (21:13 +0200)
see also http://megastep.org/makeself/

tools/linux_packaging/package

index 5fc6aee1f78e65873159878fb4d3d02a3d30cf14..d7c23f61a2852a832faa1c7fbf1ca860816f97d1 100755 (executable)
@@ -9,6 +9,7 @@ BUILDTYPE=""
 SINGLE_ARCH="F"
 X86_BUNDLE_OK="F"
 X86_64_BUNDLE_OK="F"
+MAKESELF=""
 
 
 if [ $# -eq 0 ] ; then
@@ -38,6 +39,10 @@ while [ $# -gt 0 ] ; do
                APPNAME=Ardour ;
                shift ;;
 
+       --makeself)
+               MAKESELF=`which makeself`;
+               shift ;;
+
        --singlearch) SINGLE_ARCH="T" ; shift ;;
 
        *)
@@ -155,8 +160,13 @@ cp install.sh ${PACKAGE}
 cp stage2.run ${PACKAGE}/.stage2.run
 cp README ${PACKAGE}
 
-echo "Creating tarball..."
-tar -cf ${PACKAGE}.tar ${PACKAGE}
+if test -n "$MAKESELF"; then
+       echo "Creating self-extracing installer"
+       makeself --nocomp ${PACKAGE}/ ${PACKAGE}.sh ${APPNAME} ./install.sh
+else
+       echo "Creating tarball..."
+       tar -cf ${PACKAGE}.tar ${PACKAGE}
+fi
 
 echo "Clean up"
 rm -rf ${PACKAGE}