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 6db238b..7057a20 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}"