Create easy way to update go binaries
This commit is contained in:
parent
74d255d91c
commit
c560228b3b
1 changed files with 20 additions and 0 deletions
20
home/.scripts/update_go_apps.sh
Executable file
20
home/.scripts/update_go_apps.sh
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
# updates go binary installs that you care about.
|
||||||
|
|
||||||
|
# if the GOAPPS environment variable is set, it is expected to be
|
||||||
|
# an array
|
||||||
|
update_go_apps() {
|
||||||
|
local APPS=($@)
|
||||||
|
|
||||||
|
if [ -z "${APPS}" ]; then
|
||||||
|
if [ -z "${GOAPPS}" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
APPS=(${GOAPPS[@]})
|
||||||
|
fi
|
||||||
|
|
||||||
|
for APP in "${APPS[@]}"; do
|
||||||
|
echo "Updating ${APP}"
|
||||||
|
go get -u "${APP}"
|
||||||
|
done
|
||||||
|
}
|
Loading…
Reference in a new issue