aerc has a lot of dependencies and is picky about them. Upstream does a good job at keeping them updated. aerc is prone to crashes with Fedora's dependency versions, many of which are out of date.
47 lines
822 B
Bash
Executable file
47 lines
822 B
Bash
Executable file
#!/usr/bin/bash -x
|
|
|
|
set -euo pipefail
|
|
|
|
NAME="aerc"
|
|
googlestuff="true"
|
|
|
|
usage() {
|
|
echo "./mkvendor.sh [-n (disable proxy and sumbdb)] VERSION"
|
|
if [ -n "${1-}" ]; then
|
|
exit "${1}"
|
|
fi
|
|
}
|
|
|
|
do_env() {
|
|
if [ "${googlestuff}" = "true" ]; then
|
|
GOPROXY=https://proxy.golang.org,direct
|
|
GOSUMDB=sum.golang.org
|
|
export GOPROXY GOSUMDB
|
|
fi
|
|
}
|
|
|
|
|
|
while getopts "-nh" OPT; do
|
|
case "${OPT}" in
|
|
n)
|
|
googlestuff=""
|
|
;;
|
|
h)
|
|
usage 0
|
|
;;
|
|
*)
|
|
usage 1
|
|
;;
|
|
esac
|
|
done
|
|
shift "$((OPTIND-1))"
|
|
version="${1}" || usage 1
|
|
|
|
|
|
rm -rf "${NAME}-${version}/"
|
|
tar xf "${NAME}-${version}.tar.gz"
|
|
cd "${NAME}-${version}"
|
|
do_env
|
|
go mod vendor
|
|
cd -
|
|
tar czf "${NAME}-${version}-vendor.tar.gz" "${NAME}-${version}/vendor"
|