diff --git a/tools/catalyst-auto-x86.conf b/tools/catalyst-auto-x86.conf index 064881d4..52f07b12 100644 --- a/tools/catalyst-auto-x86.conf +++ b/tools/catalyst-auto-x86.conf @@ -32,9 +32,17 @@ update_symlinks() { for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do pushd $d >/dev/null for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do - of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff - of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff - ln -sf $f $of + # 20yymmddThhmmssZ + # 20yymmddhhmmss + # 20yymmdd + # 20yy.n + of=$(perl -p \ + -e 's/20\d{6}T\d{6}Z/latest/g;' \ + -e 's/20\d{6}\d{6}/latest/g;' \ + -e 's/20\d{6}/latest/g;' \ + -e 's/20\d{2}\.\d{2}/latest/g;' \ + <<<"$f") + ln -svf "$f" "$of" done popd >/dev/null done @@ -61,7 +69,7 @@ post_build() { pushd ${BUILD_SRCDIR_BASE}/default >/dev/null mkdir -p ${TMPDIR}/empty "${cmd[@]}" ${TMPDIR}/empty ${DEST_DEFAULT} - for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do + for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do if [ -f $file ]; then "${cmd[@]}" ${file}* ${DEST_DEFAULT} fi @@ -75,7 +83,7 @@ post_build() { pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null "${cmd[@]}" ${TMPDIR}/empty ${DEST_HARDENED} - for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do + for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do if [ -f $file ]; then "${cmd[@]}" $file* ${DEST_HARDENED} fi