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