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.
This commit is contained in:
Steven Dee (Jōshin) 2025-01-05 20:20:09 -08:00
parent 90119c422c
commit b188390f6a
No known key found for this signature in database

View file

@ -99,3 +99,8 @@ rm -f cosmocc.zip cosmocc.zip.sha256sum
# commit output directory # commit output directory
cd "${OLDPWD}" || die cd "${OLDPWD}" || die
mv "${OUTPUT_TMP}" "${OUTPUT_DIR}" || die mv "${OUTPUT_TMP}" "${OUTPUT_DIR}" || die
# update current symlink
BASE=$(basename "${OUTPUT_DIR}")
DIR=$(dirname "${OUTPUT_DIR}")
ln -sfn "$BASE" "$DIR/current"