[Assorted-commits] SF.net SVN: assorted:[1033] shell-tools/trunk/src/bash-commons/assorted. bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-10-23 15:31:32
|
Revision: 1033 http://assorted.svn.sourceforge.net/assorted/?rev=1033&view=rev Author: yangzhang Date: 2008-10-23 15:31:26 +0000 (Thu, 23 Oct 2008) Log Message: ----------- updated assorted.bash to accommodate assorted-site Modified Paths: -------------- shell-tools/trunk/src/bash-commons/assorted.bash Modified: shell-tools/trunk/src/bash-commons/assorted.bash =================================================================== --- shell-tools/trunk/src/bash-commons/assorted.bash 2008-10-23 03:17:18 UTC (rev 1032) +++ shell-tools/trunk/src/bash-commons/assorted.bash 2008-10-23 15:31:26 UTC (rev 1033) @@ -22,10 +22,11 @@ project="$( basename "$( realpath "$projdir/.." )" )" root_site_dir="$( parent-dir named assorted )/assorted-site/trunk" || die 'could not find project root dir' -: ${clean:=false} ${nodl:=false} ${webfiles:=} +: ${clean:=false} ${nodl:=false} ${webfiles:=} ${chmod:=true} +footer="$root_site_dir/${footer:-google-footer.html}" prof=sf -base_web_dir=assorted/htdocs -webdir=$base_web_dir/$project +mountpt=/tmp/assorted +webdir=$mountpt/htdocs/${webdir:-$project} stagedir="$( mktemp -d )" package=$project-$version @@ -195,7 +196,7 @@ pandoc -s -S --tab-stop=2 \ -c http://assorted.sf.net/main.css \ -H "$root_site_dir/header.html" \ - -A "$root_site_dir/google-footer.html" \ + -A "$footer" \ -o "$stagedir/$out" "$src" done fi @@ -208,16 +209,24 @@ publish() { stage - scp -o Compression=on -o CompressionLevel=9 "$stagedir" - tar czf - -C "$stagedir" . | - ssh $prof " - set -o errexit -o nounset - if $clean ; then rm -r $webdir ; fi - mkdir -p $webdir - cd $webdir - tar xzmf - - chmod -R +rX . - " + # Mount sshfs if the not already mounted. + if ! mount | fgrep assorted: | fgrep "$mountpt" > /dev/null + then sshfs assorted: "$mountpt" + fi + + # Wipe out/start from scratch? + if $clean + then rm -r "$webdir" + fi + + # Copy the files over. + mkdir -p "$webdir" + cp -r "$stagedir"/* "$webdir" + + # Make the published directories world-readable. + if $chmod + then chmod -R +rX "$webdir" + fi } exp() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |