Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
fghalasz committed Jul 14, 2024
1 parent 718ae22 commit 37d8a1c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/buildDocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y tightvncserver
sudo apt-get install -y ghostscript
which ps2pdf
- name: Build apps.sysout
run: |
Expand All @@ -102,21 +101,25 @@ jobs:
eval $(ssh-agent)
ssh-add - <<< "${SSH_KEY}"
# set destination directory on files.interlisp.org
dest=/srv/oio/files/source
dest=/srv/oio/files/medley
# Push tar file up to files.interlisp.org
batchfile=/tmp/batch-$$
echo "-put ${tarfile} ${dest}.tgz" > ${batchfile}
sftp -o StrictHostKeyChecking=no -b ${batchfile} [email protected]
# now tar is up, untar it and juggle backups
scriptfile=/tmp/script-$$
echo "rm -rf ${dest}.new" > ${scriptfile}
echo "mkdir -p ${dest}.new" >> ${scriptfile}
echo "tar -C ${dest}.new -x -z -f ${dest}.tgz" >> ${scriptfile}
echo "rm -f ${dest}.tgz" >> ${scriptfile}
echo "rm -rf ${dest}.oldold" >> ${scriptfile}
echo "if [ -e ${dest}.old ]; then mv ${dest}.old ${dest}.oldold; fi" >> ${scriptfile}
echo "if [ -e ${dest} ]; then mv ${dest} ${dest}.old; fi" >> ${scriptfile}
echo "mv ${dest}.new ${dest}" >> ${scriptfile}
# create script file to do the work
cat > ${scriptfile} <<EOF
rm -rf ${dest}.new
mkdir -p ${dest}.new
tar -C ${dest}.new -x -z -f ${dest}.tgz
rm -f ${dest}.tgz
rm -rf ${dest}.oldold
if [ -e ${dest}.old ]; then mv ${dest}.old ${dest}.oldold; fi
if [ -e ${dest} ]; then mv ${dest} ${dest}.old; fi
mv ${dest}.new ${dest}
EOF
# execute the script file via ssh
ssh -aTxo BatchMode=yes [email protected] /bin/sh -s < ${scriptfile}
env:
SSH_KEY: ${{ secrets.OIO_SSH_KEY }}
Expand Down

0 comments on commit 37d8a1c

Please sign in to comment.