This is not tested and will be debugged on the server. Begin to automate the on-server setup so we can make this a self-service without much user interaction.master
parent
e3f46e8a74
commit
f5fbd4b8bd
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Dispatch based on SSH_ORIGINAL_COMMAND. rsync, diff and merge.
|
||||
# TODO: Make this interactive and show the diff before and then
|
||||
# do the merge?
|
||||
|
||||
case "$SSH_ORIGINAL_COMMAND" in
|
||||
"rsync")
|
||||
exec /usr/local/bin/rrsync web-files
|
||||
;;
|
||||
"diff-testing")
|
||||
exec `dirname $0`/make-stable.sh $1 $2 dry-run
|
||||
;;
|
||||
"merge-testing")
|
||||
exec `dirname $0`/make-stable.sh $1 $2
|
||||
;;
|
||||
esac
|
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Merge -testing into -stable by using hard links so we don't
|
||||
# double the space requirement.
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "Need to pass MACHINE RELEASE as argument for upload"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MACHINE=$1
|
||||
RELEASE=$2
|
||||
DRYRUN=$3
|
||||
|
||||
if [ "x$DRYRUN" != "x" ]; then
|
||||
ARGS=--dry-run
|
||||
fi
|
||||
|
||||
DIRS=images ipk sdk tools cache-state;
|
||||
|
||||
for i in $DIRS;
|
||||
do
|
||||
echo "Working on $i"
|
||||
rsync $ARGS --delete -avH \
|
||||
--link-dest=$PWD/web-files/$MACHINE/$RELEASE-testing/$i \
|
||||
web-files/$MACHINE/$RELEASE-testing/$i/ \
|
||||
web-files/$MACHINE/$RELEASE/$i/
|
||||
done
|
Loading…
Reference in new issue