Rename variables in update_grml_versions to be less confusing
[grml2usb.git] / tarball.sh
index 05c6f49..895d3ed 100755 (executable)
@@ -43,8 +43,8 @@ cat > "${DIR}"/install.sh << EOF
 
 set -e
 
-if [ "\$UID" != 0 ] ; then
-   echo "Error: become root before starting $0" >& 2
+if [ \$(id -u) != 0 ] ; then
+   echo "Error: become root before starting \$0" >& 2
    exit 1
 fi
 
@@ -55,6 +55,9 @@ printf "Installing files:\n"
 printf "  - /usr/sbin/grml2usb\n"
 install -m 755 \${BASE}/grml2usb /usr/sbin/grml2usb
 
+printf "  - /usr/sbin/grml2usb-compat\n"
+install -m 755 \${BASE}/grml2usb-compat /usr/sbin/grml2usb-compat
+
 printf "  - /usr/sbin/grml2iso\n"
 install -m 755 \${BASE}/grml2iso /usr/sbin/grml2iso
 
@@ -90,13 +93,14 @@ cat > "${DIR}"/uninstall.sh << EOF
 
 set -e
 
-if [ "\$UID" != 0 ] ; then
-   echo "Error: become root before starting $0" >& 2
+if [ \$(id -u) != 0 ] ; then
+   echo "Error: become root before starting \$0" >& 2
    exit 1
 fi
 
 for file in \\
   /usr/sbin/grml2usb \\
+  /usr/sbin/grml2usb-compat \\
   /usr/sbin/grml2iso \\
   /usr/share/grml2usb/grub/splash.xpm.gz \\
   /usr/share/grml2usb/grub/grml.png \\
@@ -124,7 +128,7 @@ rm grml2usb-$VERSION/grml2usb.8.txt
 rm grml2usb-$VERSION/grml2iso.8.txt
 
 # binaries, grub, lilo
-cp grml2usb grml2iso mbr/mbrldr mbr/mbrmgr grub/* lilo/lilo.static.* grml2usb-$VERSION/
+cp grml2usb grml2usb-compat grml2iso mbr/mbrldr mbr/mbrmgr grub/* lilo/lilo.static.* grml2usb-$VERSION/
 
 tar zcf grml2usb.tgz "${DIR}"