7 Usage: $(basename $0) [ options ] [ <languages list> ]
9 Create bzip2 tarball for distribution, optionally updates po files before.
12 --all-po update all languages
13 -f, --force force overwriting existing files
19 echo "$(basename $0): error: $1" > /dev
/stderr
;
23 # Init costants & parameters
32 PARAMETERS
=$
(getopt
-a -o "hf" -l "help, all-po, force" -- "$@")
34 [ $?
-ne 0 ] && { usage
; exit 1; }
36 eval set -- "$PARAMETERS"
67 [ $ALL -eq 1 ] && { err_mess
"use either --all or specify languages"; exit 1; }
74 # Complete (and check) parameter initialization
76 [ -f "Makefile" ] ||
{ echo "error: makefile not found"; exit 1; }
77 [ -f "configure.ac" ] ||
{ echo "error: configure.ac not found"; exit 1; }
79 NAME
=$
(head -n 50 configure.ac |
grep "m4_define(\[plugin_name\], \[.*\])" |
sed "s/m4_define(\[plugin_name\], \[\(.*\)\])/\1/")
80 MAJOR_VER
=$
(head -n 50 configure.ac |
grep "m4_define(\[plugin_major_version\], \[.*\])" |
sed "s/m4_define(\[plugin_major_version\], \[\(.*\)\])/\1/")
81 MINOR_VER
=$
(head -n 50 configure.ac |
grep "m4_define(\[plugin_minor_version\], \[.*\])" |
sed "s/m4_define(\[plugin_minor_version\], \[\(.*\)\])/\1/")
82 MICRO_VER
=$
(head -n 50 configure.ac |
grep "m4_define(\[plugin_micro_version\], \[.*\])" |
sed "s/m4_define(\[plugin_micro_version\], \[\(.*\)\])/\1/")
84 #[ -f "release_subv_src" ] || { echo "error: release_subv_src not found"; exit 1; }
86 #REL_SUB_VER="$(cat release_subv_src)";
87 #echo "$REL_SUB_VER" | grep -q "[[:digit:]]\+" || { echo "error: invalid release subversion: $REL_SUB_VER"; exit 1;}
88 #REL_SUB_VER=$[ $REL_SUB_VER + 1 ] || exit 1;
90 PLUGIN_NAME
="${NAME}-${MAJOR_VER}.${MINOR_VER}.${MICRO_VER}"
91 #NEW_PLUGIN_NAME="${PLUGIN_NAME}-${REL_SUB_VER}"
92 #TGZ_NAME="${PLUGIN_NAME}.tar.gz"
93 TBZ2_NAME
="${PLUGIN_NAME}.tar.bz2"
95 #NEW_TBZ2_NAME="${NEW_PLUGIN_NAME}.tar.bz2"
97 [ $FORCE -eq 0 ] && [ -f "$TBZ2_NAME" ] && { err_mess
"file exists, use --force to force writing"; exit 1; }
104 if [ "${NOPO}" -eq 0 ]
106 if [ "${ALL}" -eq 1 ]
108 intltool-update-all ||
exit 1
113 intltool-update
$LL ||
exit 1
119 make dist-bzip2 ||
exit 1
121 #mv "${TBZ2_NAME}" "${NEW_TBZ2_NAME}" || exit 1
123 #echo $REL_SUB_VER > release_subv_src;