0fe868ee83d134140f3c3336e47a87caf007638d
[mailer.git] / updater / .config.sh
1 #!/bin/sh
2 # Self-test
3 if test "`basename $0`" = ".config.sh"; then
4         echo "Bye..."
5         exit 0
6 fi
7
8 # General config stuff
9 THIS_DIR="/Homepages/MXChange"
10 BASEDIR="$HOME/Test/Projects"
11 EXT_DIR="mxchange_ext"
12 THEME_DIR="mxchange_themes"
13 UPLOAD_DIR="$BASEDIR/$EXT_DIR"
14 EXT="ext"
15 THEME="theme"
16 HTML="html"
17 CMS="cms"
18 HP="hp"
19
20 BASENAME="mxchange"
21 VER="0.3.0"
22 PRE=""
23
24 SMALL="small"
25 MEDIUM="medium"
26 MAX="max"
27
28 ZIP="/usr/bin/zip"
29 BZIP2="/usr/bin/bzip2"
30
31 # Target directory
32 TARGET=$BASEDIR/$BASENAME
33
34 # Archive stuff
35 if test "$PRE" != ""; then
36         TAR_ARC="$BASENAME-$VER-pre$PRE.tar"
37         ZIP_ARC="$BASENAME-$VER-pre$PRE.zip"
38         TAR_SMALL=""
39         ZIP_SMALL=""
40         TAR_MEDIUM=""
41         ZIP_MEDIUM=""
42         TAR_MAX=""
43         ZIP_MAX=""
44  else
45         TAR_ARC="$BASENAME-$VER.tar"
46         ZIP_ARC="$BASENAME-$VER.zip"
47         TAR_SMALL="$BASENAME-$SMALL-$VER.tar"
48         ZIP_SMALL="$BASENAME-$SMALL-$VER.zip"
49         TAR_MEDIUM="$BASENAME-$MEDIUM-$VER.tar"
50         ZIP_MEDIUM="$BASENAME-$MEDIUM-$VER.zip"
51         TAR_MAX="$BASENAME-$MAX-$VER.tar"
52         ZIP_MAX="$BASENAME-$MAX-$VER.zip"
53 fi
54
55 # Files stuff which will be archived
56 CP_FILES="ChangeLog* README $HTML/ $HTML/DOCS/??/LICENSE*"
57
58 # Convert files
59 cd $BASEDIR
60 CONV_FILES="ChangeLog* README DOCS/??/* *.de *.en *.php *.css *.sql robots.txt .htaccess *.tpl DOCS/??/*"
61
62 # Files to be removed before any archiving steps
63 RM_FILES="$BASENAME-$VER/$HTML/*.zip $BASENAME-$VER/$HTML/temp/ $BASENAME-$VER/$HTML/upgrade???to*.sql"
64 RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/inc/class.*.php $BASENAME-$VER/$HTML/.htaccess $BASENAME/$HTML/test.php"
65 RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/inc/cache/*.cache $BASENAME/$HTML/inc/cache/*.cache $BASENAME/$HTML/*.log"
66 RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/test.php $BASENAME-$VER/$HTML/*.log $BASENAME-$VER/$HTML/sql_fixes.sql"
67 RM_FILES="$RM_FILES $BASENAME-$VER/$HTML/jackpot.sql"
68
69 # Files to be remove before CVS update
70 RM_FILES_CVS="../$BASENAME-$VER/$HTML/inc/cache/*.cache ../$BASENAME-$CMS-$CMS_VER/$HTML/inc/cache/*.cache"
71 RM_FILES_CVS="$RM_FILES_CVS $HTML/inc/cache/*.cache ../$BASENAME-$HP-$HP_VER/$HTML/inc/cache/*.cache"
72
73 # Files to be added in extension archives
74 EXT_FILES="DOCS/LICENSE* DOCS/??/LICENSE* DOCS/??/EXTENSIONS.*"
75
76 # Files to be added in command archives
77 CMDS_FILES="DOCS/LICENSE* DOCS/??/LICENSE* DOCS/??/README_engine.*"
78
79 # Files to be added in theme archives
80 THEME_FILES="DOCS/LICENSE* DOCS/??/LICENSE* DOCS/??/README_themes*"
81
82 # Copy options and target directories
83 CP_OPTIONS="--parent -R --verbose --preserve=all"
84
85 # Importing CVS settings
86 . $THIS_DIR/.cvs.sh
87
88 if test "$CVS_ENABLE" = "auto"; then
89         # Auto-detect CVS update
90         if test "$1" = ""; then
91                 # Switch off CVS update
92                 CVS="no"
93          else
94                 # Switch on CVS update
95                 CVS="yes"
96         fi
97  else
98         CVS="$CVS_ENABLE"
99 fi
100 cd - > /dev/null 2>&1