1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-17 08:43:21 +00:00
PDP-10.its/build/deploy-ftp.sh
Mike Kostersitz (Oilcan Productions) 086f09820c Update deploy-ftp.sh
Another update as the ISP updated cPanel and the DNS and folder structure changed
2024-01-16 20:47:25 +01:00

34 lines
527 B
Bash

#!/bin/sh
set -e
HOST="hactrn.kostersitz.com"
USER="if0_35726802@hactrn.kostersitz.com"
DIR="/images"
NETRC="$HOME/.netrc"
if test -z "$FTP_SECRET"; then
echo 'ERROR: No password in $FTP_SECRET.'
exit 1
fi
echo "machine $HOST" > "$NETRC"
echo "login $USER" >> "$NETRC"
echo "password $FTP_SECRET" >> "$NETRC"
chmod 600 "$NETRC"
(cd out; tar czf $EMULATOR.tgz $EMULATOR)
echo "Deploying as $USER at $HOST"
ftp "$HOST" <<EOF
passive on
type image
cd $DIR
lcd out
put $EMULATOR.tgz
bye
EOF
exit 0