forked from naderman/sphinx-for-phpbb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_mod
executable file
·36 lines (27 loc) · 848 Bytes
/
make_mod
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
36
#!/usr/bin/env bash
print_help() {
echo "Usage: make_mod MOD_VERSION"
exit 1
}
mod_version="$1"
mod_name="sphinx4phpbb-$mod_version"
if [ "$1" = "--help" -o "$1" = "-h" -o "$1" == "" ]; then
print_help
fi
if [ -e "$mod_name" ]; then
echo "$mod_name exists, delete before running this script"
print_help
fi
if [ -e "$mod_name.tar.bz2" ]; then
echo "$mod_name.tar.bz2 exists, delete before running this script"
print_help
fi
mkdir -p $mod_name/root
cp sphinx_mod/* $mod_name/
cp -r sphinx_plugin/includes $mod_name/root/
cp -r sphinx_plugin/language $mod_name/root/
cp -r sphinx_plugin/config $mod_name/
find $mod_name/ -type d -name ".svn" -exec echo -n 'deleted ' \; -print -exec rm -rf {} \;
find $mod_name/ -type f -name "*~" -exec echo -n 'deleted ' \; -print -exec rm {} \;
tar -cjvf $mod_name.tar.bz2 $mod_name
rm -rf $mod_name