# HG changeset patch # User Pawel Solyga # Date 1221586689 0 # Node ID 2d5a7c18f9ea3b25074811d6e7d8e8aa38007be7 # Parent 8a64fc6b9d0eb9c33e10f2eacbdd115cdf1a211c Updated make_release.sh docs and added way for person invoking the script to override script variables such as RELEASE using something like "RELEASE=../testing_release ./make_release.sh". diff -r 8a64fc6b9d0e -r 2d5a7c18f9ea scripts/make_release.sh --- a/scripts/make_release.sh Tue Sep 16 17:07:58 2008 +0000 +++ b/scripts/make_release.sh Tue Sep 16 17:38:09 2008 +0000 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Script to create a "release" subdirectory. This is a subdirectory # containing a bunch of symlinks, from which the app can be updated. @@ -9,16 +9,21 @@ # each update. DJANGO_ZIPFILE=django.zip -RELEASE=../release -APP_FOLDER="../app" -APP_FILES="app.yaml index.yaml __init__.py main.py settings.py urls.py" -APP_DIRS="soc ghop gsoc feedparser tiny_mce" +DEFAULT_APP_RELEASE=../release +DEFAULT_APP_FOLDER="../app" +DEFAULT_APP_FILES="app.yaml index.yaml __init__.py main.py settings.py urls.py" +DEFAULT_APP_DIRS="soc ghop gsoc feedparser tiny_mce" + +APP_RELEASE=${APP_RELEASE:-"${DEFAULT_APP_RELEASE}"} +APP_FOLDER=${APP_FOLDER:-"${DEFAULT_APP_FOLDER}"} +APP_FILES=${APP_FILES:-"${DEFAULT_APP_FILES}"} +APP_DIRS=${APP_DIRS:-"${DEFAULT_APP_DIRS}"} cd $APP_FOLDER -# Remove old $ZIPFILE file. +# Remove old $DJANGO_ZIPFILE file. rm -rf $DJANGO_ZIPFILE -# Create new $ZIPFILE file. +# Create new $DJANGO_ZIPFILE file. # We prune: # - .svn subdirectories for obvious reasons. # - contrib/gis/ and related files because it's huge and unneeded. @@ -40,15 +45,17 @@ -name test -prune -o \ -type f ! -name \*.py[co] ! -name *.[pm]o -print` -# Remove old $RELEASE directory. -rm -rf $RELEASE +# Remove old $APP_RELEASE directory. +rm -rf $APP_RELEASE -# Create new $RELEASE directory. -mkdir $RELEASE +# Create new $APP_RELEASE directory. +mkdir $APP_RELEASE # Create symbolic links. for x in $APP_FILES $APP_DIRS $DJANGO_ZIPFILE do - echo $APP_FOLDER/$x $RELEASE/$x - ln -s $APP_FOLDER/$x $RELEASE/$x + #echo $APP_FOLDER/$x $APP_RELEASE/$x + ln -s $APP_FOLDER/$x $APP_RELEASE/$x done + +echo "Release created in $APP_RELEASE."