diff options
author | Alec Leamas <leamas.alec@gmail.com> | 2010-12-06 15:11:37 +0300 |
---|---|---|
committer | Alec Leamas <leamas.alec@gmail.com> | 2010-12-06 15:36:24 +0300 |
commit | 05410828048f02c37729f38758efd255dfd85255 (patch) | |
tree | 4ebbcd6a4020ff02ce878d627c8bf65affb1dd33 /script | |
parent | 9bc89349702d57f2f9c92558443e2860e2593d32 (diff) |
Fixing server when no git files, not on master
Allows server to run even if on another branch than master and/or
in a production scenario without git files available.
Diffstat (limited to 'script')
-rwxr-xr-x | script/server | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/script/server b/script/server index 09c93b868..f03af9381 100755 --- a/script/server +++ b/script/server @@ -76,7 +76,11 @@ fi # Force AGPL if [ -w public -a ! -e public/source.tar.gz ]; then - tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'` + if [ -r config/git-ls-tree ]; then + tar czf public/source.tar.gz $( cat config/git-ls-tree) + else + tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'` + fi fi if [ ! -e public/source.tar.gz ]; then echo "Error: Can't find, or even create, public/source.tar.gz. Exiting" >&2 @@ -84,13 +88,13 @@ if [ ! -e public/source.tar.gz ]; then fi # Precache jammit assets -if [[ -w public && ! -e public/stylesheets/application.css ]]; then +if [[ -w public && ! -e 'public/stylesheets/application.css' ]]; then if [ "$INIT_PUBLIC" != 'no' ]; then echo "Making first-time server initialization." init_public fi fi -if [ ! -e 'public/assets/main.js.gz' ]; then +if [ ! -e 'public/stylesheets/application.css' ]; then echo 'Jammit precache error (now or at install)' >&2 exit 66 fi |