rsync_ui now finds Pillar by itself, no longer requires PILLAR_DIR
This commit is contained in:
14
rsync_ui.sh
14
rsync_ui.sh
@@ -1,10 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
: ${PILLAR_DIR?"Need to set PILLAR_DIR"}
|
||||
PILLAR_DIR=$(python <<EOT
|
||||
from __future__ import print_function
|
||||
import os.path
|
||||
import pillar
|
||||
|
||||
print(os.path.dirname(os.path.dirname(pillar.__file__)))
|
||||
EOT
|
||||
)
|
||||
|
||||
ASSETS="$PILLAR_DIR/pillar/web/static/assets/"
|
||||
TEMPLATES="$PILLAR_DIR/pillar/web/templates/"
|
||||
|
||||
if [ ! -d "$ASSETS" ]; then
|
||||
echo "Unable to find assets dir $ASSETS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $PILLAR_DIR
|
||||
if [ $(git rev-parse --abbrev-ref HEAD) != "production" ]; then
|
||||
echo "You are NOT on the production branch, refusing to rsync_ui." >&2
|
||||
|
Reference in New Issue
Block a user