]> git.cameronkatri.com Git - apple_cmds.git/commitdiff
create_tarballs.sh: Track versions v1.0
authorCameron Katri <me@cameronkatri.com>
Sat, 15 May 2021 02:57:02 +0000 (22:57 -0400)
committerCameron Katri <me@cameronkatri.com>
Sat, 15 May 2021 02:57:02 +0000 (22:57 -0400)
create_tarballs.sh

index 89e15883908b9b342b6ce295e25cf1e6dc10a025..fddacdb8ea474883c61a832ce4c679595615313b 100755 (executable)
@@ -15,18 +15,15 @@ for i in adv_cmds basic_cmds bootstrap_cmds \
                patch_cmds remote_cmds shell_cmds \
                system_cmds text_cmds; do
        EXTRA_PATHS=""
-       REGEX=""
+       VERSION="$(cat ${i}/.apple_version)"
+       REGEX="|^${i}|${i}-${VERSION}|"
        case "$i" in
-               network_cmds) REGEX="|^|network_cmds/|" EXTRA_PATHS="lib/libpcap";;
-               remote_cmds) REGEX="|^|remote_cmds/|" EXTRA_PATHS="lib/libtelnet";;
+               network_cmds) REGEX="|^|network_cmds-${VERSION}/|" EXTRA_PATHS="lib/libpcap";;
+               remote_cmds) REGEX="|^|remote_cmds-${VERSION}/|" EXTRA_PATHS="lib/libtelnet";;
        esac
        num=$((num+1))
        printf "(%i) %s\n" "$num" "$i"
        cp setup.sh $i/setup.sh
-       if [ "${REGEX}" == "" ]; then
-               ${TAR} -caf $i.tar.zst $i ${EXTRA_PATHS}
-       else
-               ${TAR} -s ${REGEX} -caf $i.tar.zst $i ${EXTRA_PATHS}
-       fi
+       ${TAR} -s ${REGEX} -caf ${i}-${VERSION}.tar.zst $i ${EXTRA_PATHS}
        rm $i/setup.sh
 done