Changeset 111
- Timestamp:
- 03/27/2009 09:51:35 PM (3 years ago)
- Location:
- trunk/WordPress/plugin/transposh
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh
-
Property
svn:ignore
set to
.project
-
Property
svn:ignore
set to
-
trunk/WordPress/plugin/transposh/build.sh
r66 r111 6 6 7 7 VERSION=$1; 8 DEBUG=$2; 9 ZIPME=$3; 8 10 9 11 if [ -z $VERSION ]; then 10 echo "Must enter a version number !!!"11 echo "Usage: $0 0.1.0"12 exit12 echo "Must enter a version number !!!" 13 echo "Usage: $0 0.1.0 [[debug] zip]" 14 exit 13 15 fi 14 16 15 17 TMP_DIR="tmp" 16 18 TRANSPOSH_DIR=$TMP_DIR/transposh 17 18 19 19 20 echo "Building package for WordPress plugin version: $VERSION"; … … 30 31 # 31 32 for DIR in flags js; do 32 cp -r $DIR $TRANSPOSH_DIR33 echo "added sub-directory $DIR"33 cp -r $DIR $TRANSPOSH_DIR 34 echo "added sub-directory $DIR" 34 35 done; 35 36 echo … … 39 40 # 40 41 for FTYPE in css png txt; do 41 cp *.$FTYPE $TRANSPOSH_DIR42 echo "added $FTYPE files"42 cp *.$FTYPE $TRANSPOSH_DIR 43 echo "added $FTYPE files" 43 44 done; 44 45 echo … … 47 48 #Add php files while removing logging operations 48 49 # 49 echo "Adding .php files (without logging)" 50 51 for file in `find . -maxdepth 1 -iname '*.php' -printf "%p "`; do 52 sed "s/logger.*;//;s/require_once(\"logging.*//;s/<%VERSION%>/$VERSION/;" $file > $TRANSPOSH_DIR/$file 53 echo "added $file" 54 done; 50 if [ "$DEBUG" != 'debug' ]; then 51 echo "Adding .php files (without logging)" 52 for file in `find . -maxdepth 1 -iname '*.php' -printf "%p "`; do 53 sed "s/logger.*;//;s/require_once(\"logging.*//;s/<%VERSION%>/$VERSION/;" $file > $TRANSPOSH_DIR/$file 54 echo "added $file" 55 done; 56 else 57 echo "Adding .php files (with logging)" 58 cp *.php $TRANSPOSH_DIR 59 fi 55 60 echo 56 61 … … 64 69 # Remove logging.php 65 70 # 66 67 rm $TRANSPOSH_DIR/logging.php 68 echo "removed logging.php" 71 if [ "$DEBUG" != 'debug' ]; then 72 rm $TRANSPOSH_DIR/logging.php 73 echo "removed logging.php" 74 else 75 rm $TRANSPOSH_DIR/screenshot*.png 76 echo "removed screenshots" 77 fi 69 78 70 79 # Remove .svn dirs 71 find tmp -name "*.svn*" -exec rm -rf {} \;80 find tmp -name "*.svn*" -exec rm -rf {} 2>/dev/null \; 72 81 echo "removed .svn dirs" 73 82 … … 75 84 #Generate zip file 76 85 # 77 #cd $TMP_DIR 78 #zip -r "transposh.$VERSION.zip" . 79 #cd - >/dev/null 80 #mv "$TMP_DIR/transposh.$VERSION.zip" . 81 82 #echo 83 #echo "transposh.$VERSION.zip is ready" 86 if [ "$ZIPME" == 'zip' ]; then 87 cd $TMP_DIR 88 zip -rq "transposh.$VERSION.zip" . 89 cd - >/dev/null 90 mv "$TMP_DIR/transposh.$VERSION.zip" . 91 echo 92 echo "transposh.$VERSION.zip is ready" 93 fi -
trunk/WordPress/plugin/transposh/logging.php
r40 r111 1 1 <?php 2 2 /* 3 * Logging Ut lis.3 * Logging Utils. 4 4 */ 5 5 … … 13 13 //Enable tracing level. 14 14 //0 - disabled. Higher numbers will show more debug information. 15 define ("DEBUG" , 0);15 define ("DEBUG" , 3); 16 16 17 17 /* 18 * Print a message to log. 18 * Print a message to log. 19 19 */ 20 function logger($msg, $severity=3) 20 function logger($msg, $severity=3) 21 21 { 22 22 if($severity <= DEBUG) 23 23 { 24 error_log(date(DATE_RFC822) . ": " . $msg . "\n", 3, "/ var/tmp/transposh.log");24 error_log(date(DATE_RFC822) . ": " . $msg . "\n", 3, "/tmp/transposh.log"); 25 25 } 26 26 }
Note: See TracChangeset
for help on using the changeset viewer.
