forked from carlobaldassi/gimp-lqr-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makedist
executable file
·56 lines (46 loc) · 1.65 KB
/
makedist
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/bash
NOPO=0
ALL=1
if [ -n "$1" ]
then
if [ "$1" == "--nopo" ]
then
NOPO=1
else
ALL=0
LANGS="$@"
fi
fi
[ -f "Makefile" ] || { echo "error: makefile not found"; exit 1; }
[ -f "configure.ac" ] || { echo "error: configure.ac not found"; exit 1; }
NAME=$(head -n 50 configure.ac | grep "m4_define(\[plugin_name\], \[.*\])" | sed "s/m4_define(\[plugin_name\], \[\(.*\)\])/\1/")
MAJOR_VER=$(head -n 50 configure.ac | grep "m4_define(\[plugin_major_version\], \[.*\])" | sed "s/m4_define(\[plugin_major_version\], \[\(.*\)\])/\1/")
MINOR_VER=$(head -n 50 configure.ac | grep "m4_define(\[plugin_minor_version\], \[.*\])" | sed "s/m4_define(\[plugin_minor_version\], \[\(.*\)\])/\1/")
MICRO_VER=$(head -n 50 configure.ac | grep "m4_define(\[plugin_micro_version\], \[.*\])" | sed "s/m4_define(\[plugin_micro_version\], \[\(.*\)\])/\1/")
#[ -f "release_subv_src" ] || { echo "error: release_subv_src not found"; exit 1; }
#
#REL_SUB_VER="$(cat release_subv_src)";
#echo "$REL_SUB_VER" | grep -q "[[:digit:]]\+" || { echo "error: invalid release subversion: $REL_SUB_VER"; exit 1;}
#REL_SUB_VER=$[ $REL_SUB_VER + 1 ] || exit 1;
PLUGIN_NAME="${NAME}-${MAJOR_VER}.${MINOR_VER}.${MICRO_VER}"
#NEW_PLUGIN_NAME="${PLUGIN_NAME}-${REL_SUB_VER}"
TGZ_NAME="${PLUGIN_NAME}.tar.gz"
TBZ2_NAME="${PLUGIN_NAME}.tar.bz2"
NEW_TBZ2_NAME="${NEW_PLUGIN_NAME}.tar.bz2"
if [ "${NOPO}" -eq 0 ]
then
if [ "${ALL}" -eq 1 ]
then
intltool-update-all || exit 1
else
cd po || exit 1
for LL in $LANGS
do
../intltool-update $LL || exit 1
done
cd .. || exit 1
fi
fi
make dist-bzip2 || exit 1
#mv "${TBZ2_NAME}" "${NEW_TBZ2_NAME}" || exit 1
#echo $REL_SUB_VER > release_subv_src;