Update Simplified Chinese Strings (#1610)
[gpodder.git] / tools / win_installer / rebuild.sh
blob1e6fcdc4abcf823e10efaabfe1ed83fa1d15e702
1 #!/usr/bin/env bash
2 # Copyright 2016 Christoph Reiter
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 DIR="$( cd "$( dirname "$0" )" && pwd )"
10 source "$DIR"/_base.sh
12 set_build_root "${DIR}/_rebuild_root"
14 function main {
15 local INSTALLER_PATH=${1}
16 local GIT_TAG=${2:-"master"}
18 [[ -d "${BUILD_ROOT}" ]] && (echo "${BUILD_ROOT} already exists"; exit 1)
20 # started from the wrong env -> switch
21 if [ $(echo "$MSYSTEM" | tr '[A-Z]' '[a-z]') != "$MINGW" ]; then
22 "/${MINGW}.exe" "$0"
23 exit $?
26 install_pre_deps
27 create_root
28 extract_installer "$INSTALLER_PATH"
29 cleanup_before
30 install_gpodder "$GIT_TAG"
31 cleanup_after
32 build_installer
33 build_portable_installer
36 main "$@";