Skip to content

Commit

Permalink
harden against spaces in pathnames
Browse files Browse the repository at this point in the history
  • Loading branch information
gstein committed Jul 11, 2023
1 parent 4943262 commit 938b123
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions devtest/compare.sh
Expand Up @@ -5,29 +5,30 @@
# ./compare.sh gora ~/src/asf/gora-site main
#

invoked=`dirname $0`
absdir=`realpath $invoked`
bindir=`dirname $absdir`/bin
#echo $bindir
invoked="`dirname $0`"
absdir="`realpath $invoked`"
bindir="`dirname $absdir`/bin"
#echo "$bindir"

project=$1
source=$2 # URL or pathname to a local clone
branch=$3
project="$1"
source="$2" # URL or pathname to a local clone
branch="$3"

set -x

### maybe skip if already defined in ENV?
export LIBCMARKDIR=/tmp/cm/cmark-gfm-0.28.3.gfm.12/lib

cd $source
cd "$source"

# Get the branch where pelicanconf.* lives
git checkout $branch
git checkout "$branch"

# Now build the site into /tmp/$project/
$bindir/buildsite.py git --project $project --source $source --sourcebranch $branch || exit 1
"$bindir/buildsite.py" git --project "$project" --source "$source" --sourcebranch "$branch" || exit 1

# Switch to what the current/prior website looks like
git checkout asf-site

# Give a quick summary of old/new site
diff -rq output /tmp/$project/source/output
diff -rq output "/tmp/$project/source/output"

0 comments on commit 938b123

Please sign in to comment.