2023-01-12 07:19:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-02-17 03:20:21 +00:00
|
|
|
DEST=$(grep "#define DEPLOY_DEST" config.h | awk '{print $3}' | sed -e 's/"//g')
|
2023-10-21 04:44:33 +00:00
|
|
|
IDENT=$(grep "#define DEPLOY_IDENT" config.h | awk '{print $3}' | sed -e 's/"//g')
|
2024-09-27 01:32:04 +00:00
|
|
|
SITEROOT=$(grep "#define SITEROOT" config.h | awk '{print $3}' | sed -e 's/"//g')
|
|
|
|
TWTXT=$(grep "#define TWTXT" config.h | awk '{print $3}' | sed -e 's/"//g')
|
2021-10-26 20:57:55 +00:00
|
|
|
|
2024-09-27 01:32:04 +00:00
|
|
|
if [ "$1" = "--resync" ]; then
|
2023-10-21 04:44:33 +00:00
|
|
|
rsync -avk -e "ssh -i ~/.ssh/${IDENT}" --delete ${DEST} ../
|
2024-09-27 01:32:04 +00:00
|
|
|
else
|
|
|
|
rsync -avK -e "ssh -i ~/.ssh/${IDENT}" --delete ../ ${DEST}
|
|
|
|
if [ "$1" = "--syndicate" ] && [ $? -eq 0 ]; then
|
|
|
|
./underbbs.sh honk "$(head -n 1 ${SITEROOT}/${TWTXT})"
|
|
|
|
fi
|
2023-01-12 07:19:55 +00:00
|
|
|
fi
|