Support template filenames in grml-live.
authorUlrich Dangel <mru@grml.org>
Mon, 19 Dec 2011 14:59:34 +0000 (15:59 +0100)
committerUlrich Dangel <mru@grml.org>
Mon, 19 Dec 2011 18:01:53 +0000 (19:01 +0100)
grml-live

index dbc9bbd..3bcf349 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -951,6 +951,14 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
          fi
        done
 
+       for param in ARCH DATE DISTRI_INFO DISTRI_NAME DISTRI_SPLASH GRML_NAME SQUASHFS_NAME \
+           RELEASE_INFO SHORT_NAME VERSION ; do
+           for file in $(find "${BUILD_OUTPUT}" -name "*%$param%*") ; do
+               value="$(eval echo '$'"$param")"
+               mv ${file} ${file/\%${param}\%/$value}
+           done
+       done
+
        # adjust bootsplash accordingly but make sure the string has the according lenght
        SQUASHFS_NAME="$(cut_string 20 "$SQUASHFS_NAME")"
        SQUASHFS_NAME="$(extend_string_end 20 "$SQUASHFS_NAME")"