From b188390f6ae06e54370c7f6f48908dc7ab497358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Dee=20=28J=C5=8Dshin=29?= Date: Sun, 5 Jan 2025 20:20:09 -0800 Subject: [PATCH] Maintain a current symlink Gives a shorthand path to the currently installed version of cosmocc, so we can refer to its make from scripts and such. --- build/download-cosmocc.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/download-cosmocc.sh b/build/download-cosmocc.sh index 13310a4e4..52c89b091 100755 --- a/build/download-cosmocc.sh +++ b/build/download-cosmocc.sh @@ -99,3 +99,8 @@ rm -f cosmocc.zip cosmocc.zip.sha256sum # commit output directory cd "${OLDPWD}" || die mv "${OUTPUT_TMP}" "${OUTPUT_DIR}" || die + +# update current symlink +BASE=$(basename "${OUTPUT_DIR}") +DIR=$(dirname "${OUTPUT_DIR}") +ln -sfn "$BASE" "$DIR/current"