]> Untitled Git - hvutilities.git/commitdiff
hvk: remove old archive
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 16 Sep 2025 15:48:38 +0000 (11:48 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Tue, 16 Sep 2025 15:50:22 +0000 (11:50 -0400)
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
scripts/hvk-compile.sh

index 6db238b51168ab3bf47fcfa868db3c843d037a70..7057a20f4f00726ce81953ca018f8b41f16dea64 100755 (executable)
@@ -6,6 +6,7 @@ SCRIPTPATH=$(dirname ${SCRIPT})
 source ${SCRIPTPATH}/hvk-common.sh
 
 DEPLOYDIR=rootfs
+ARCHIVE_LN=linux-latest.tar.xz
 
 print_usage()
 {
@@ -112,6 +113,11 @@ function rootfs_install() {
 }
 
 function rootfs_archive() {
+    if [ -L "${ARCHIVE_LN}" ]; then
+        rm $(readlink ${ARCHIVE_LN})
+        rm ${ARCHIVE_LN}
+    fi
+
     if [ -f "include/config/kernel.release" ]; then
         archive="linux-$(cat include/config/kernel.release).tar.xz"
     fi
@@ -124,6 +130,8 @@ function rootfs_archive() {
     pushd ${deploydir}
     tar cf - * | xz > ../${archive}
     popd
+
+    ln -sf ${archive} ${ARCHIVE_LN}
 }
 
 KMAKE="${KMAKE} ${warnings_opts}"