-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdistribution.sh
executable file
·35 lines (33 loc) · 955 Bytes
/
distribution.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
NAME="hak_tinymce"
CURRENT_DIR=$(pwd)
DIST_DIR="$NAME-dist"
TPL_DIR="$CURRENT_DIR/template"
TINYMCE_DIR="tiny_mce"
DISTRO_DIR="$CURRENT_DIR/tinymce-distro/jscripts/$TINYMCE_DIR"
COMPRESSOR_DIR="$CURRENT_DIR/tinymce_compressor_php"
DEV_PLUGIN_DIR="$DIST_DIR/$TINYMCE_DIR/plugins"
TXPIMAGE_DIR="$CURRENT_DIR/txpimage"
HELP_FILE="help.html"
echo "removing old dist folder "
rm -r $DIST_DIR
echo "creating new dist folder"
mkdir $DIST_DIR
echo "copying distro folder to dist root"
cp -r $DISTRO_DIR $DIST_DIR
echo "copying compressor to dev dir"
cp $COMPRESSOR_DIR/tiny_mce_gzip.* $DIST_DIR/$TINYMCE_DIR
echo "copying txpimage into tinymce directory"
cp -r $TXPIMAGE_DIR $DEV_PLUGIN_DIR
echo "create distribution"
cp $NAME.php $TPL_DIR
cp $HELP_FILE $TPL_DIR
cd $TPL_DIR
php $NAME.php > $NAME.txt
mv $NAME.txt $CURRENT_DIR/$DIST_DIR
rm $NAME.php
rm $HELP_FILE
cd $CURRENT_DIR
cp install.txt $DIST_DIR
zip -r $NAME.zip $DIST_DIR
rm -r $DIST_DIR