1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-11 23:53:12 +00:00

Change to ensure the tarball is actually re-recreated on retry

This commit is contained in:
Mike Kostersitz (Oilcan Productions) 2024-05-06 08:10:13 -07:00
parent b429d1f673
commit eb801cea3c
2 changed files with 22 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/build/*/stamp
/build/klh10/dskdmp.ini
/user/*/*
test.sh

View File

@ -18,8 +18,28 @@ echo "login $USER" >> "$NETRC"
echo "password $FTP_SECRET" >> "$NETRC"
chmod 600 "$NETRC"
pack_archive() {
local out_dir="out"
local tar_file="$EMULATOR.tgz"
# removing the tar file if it exists
if [ -e "$out_dir/$tar_file" ]; then
echo "Removing existing $tar_file..."
rm "$out_dir/$tar_file"
else
echo "$tar_file does not exist. Skipping removal."
fi
# creating the tarball
echo "Creating new $tar_file..."
tar czf "$out_dir/$tar_file" "$out_dir/$EMULATOR"
}
upload_file(){
(cd out; tar czf $EMULATOR.tgz $EMULATOR)
# (cd out; rm -r $EMULATOR.tgz; tar czf $EMULATOR.tgz $EMULATOR)
pack_archive
echo "Deploying as $USER at $HOST"