15 lines
613 B
Bash
Executable file
15 lines
613 B
Bash
Executable file
#!/bin/sh
|
|
|
|
DEST=$(grep "#define DEPLOY_DEST" config.h | awk '{print $3}' | sed -e 's/"//g')
|
|
IDENT=$(grep "#define DEPLOY_IDENT" config.h | awk '{print $3}' | sed -e 's/"//g')
|
|
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')
|
|
|
|
if [ "$1" = "--resync" ]; then
|
|
rsync -avk -e "ssh -i ~/.ssh/${IDENT}" --delete ${DEST} ../
|
|
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
|
|
fi
|