mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
31 lines
605 B
Bash
31 lines
605 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
#set -v
|
|
|
|
LIVE_SNIPPET_DIR=/opt/aus2/incoming/3
|
|
STAGING_DIR=/opt/aus2/snippets/staging
|
|
|
|
RSYNC=/usr/bin/rsync
|
|
SED=/bin/sed
|
|
|
|
if test -z $1; then
|
|
echo Usage: $0 [snippet-directory-to-sync-in from $STAGING_DIR]
|
|
exit 1
|
|
fi
|
|
|
|
newSnippetDir=`echo $1 | $SED -e 's/\///'g`
|
|
|
|
if ! test -d $STAGING_DIR/$newSnippetDir; then
|
|
echo Usage: $0 [snippet-directory-to-sync-in from $STAGING_DIR]
|
|
exit 1
|
|
fi
|
|
|
|
# publish the new snippets
|
|
pushd $STAGING_DIR > /dev/null
|
|
echo Running $RSYNC -Pa $STAGING_DIR/$1/ $LIVE_SNIPPET_DIR
|
|
$RSYNC -Pa $STAGING_DIR/$1/ $LIVE_SNIPPET_DIR
|
|
popd > /dev/null
|
|
|
|
exit 0
|