mirror of
https://github.com/openziti/zrok.git
synced 2024-11-07 16:54:23 +01:00
require a package name instead of assuming zrok-share
This commit is contained in:
parent
4c7af44734
commit
8823c3ce7c
@ -48,15 +48,18 @@ repo_gpgcheck=1"
|
|||||||
if [ "$EXISTINGSUM" != "$REPOSUM" ]; then
|
if [ "$EXISTINGSUM" != "$REPOSUM" ]; then
|
||||||
mv -v $REPOFILE{,".$(date -Iseconds)"}
|
mv -v $REPOFILE{,".$(date -Iseconds)"}
|
||||||
echo "$REPOSRC" > $REPOFILE
|
echo "$REPOSRC" > $REPOFILE
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$REPOSRC" >| $REPOFILE
|
echo "$REPOSRC" >| $REPOFILE
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$PACKAGER update --assumeyes
|
$PACKAGER update --assumeyes
|
||||||
$PACKAGER install --assumeyes zrok-share
|
$PACKAGER install --assumeyes "$@"
|
||||||
zrok version
|
for PKG in "$@"; do
|
||||||
$PACKAGER info zrok-share
|
$PACKAGER info "$PKG"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
installDebian(){
|
installDebian(){
|
||||||
@ -107,23 +110,30 @@ installDebian(){
|
|||||||
if [ "$EXISTINGSUM" != "$REPOSUM" ]; then
|
if [ "$EXISTINGSUM" != "$REPOSUM" ]; then
|
||||||
mv -v $REPOFILE{,".$(date -Iseconds)"}
|
mv -v $REPOFILE{,".$(date -Iseconds)"}
|
||||||
echo "$REPOSRC" > $REPOFILE
|
echo "$REPOSRC" > $REPOFILE
|
||||||
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$REPOSRC" >| $REPOFILE
|
echo "$REPOSRC" >| $REPOFILE
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install --yes zrok-share
|
apt-get install --yes "$@"
|
||||||
zrok version
|
for PKG in "$@"; do
|
||||||
apt-cache show zrok-share=$(dpkg-query -W -f='${Version}' zrok-share)
|
apt-cache show "$PKG=$(dpkg-query -W -f='${Version}' $PKG)"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
main(){
|
main(){
|
||||||
|
if ! (( $# )); then
|
||||||
|
echo "ERROR: No arguments provided. Please provide a space-separated list of packages to install from the OpenZiti repo." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
# Detect the system's distribution family
|
# Detect the system's distribution family
|
||||||
if [ -f /etc/redhat-release ]; then
|
if [ -f /etc/redhat-release ]; then
|
||||||
installRedHat
|
installRedHat "$@"
|
||||||
elif [ -f /etc/debian_version ]; then
|
elif [ -f /etc/debian_version ]; then
|
||||||
installDebian
|
installDebian "$@"
|
||||||
else
|
else
|
||||||
echo "ERROR: Unsupported Linux distribution family. The zrok-share package is availabe as a Debian or Red Hat package." >&2
|
echo "ERROR: Unsupported Linux distribution family. The zrok-share package is availabe as a Debian or Red Hat package." >&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -131,4 +141,4 @@ main(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ensure the script is not executed before it is fully downloaded if curl'd to bash
|
# ensure the script is not executed before it is fully downloaded if curl'd to bash
|
||||||
main
|
main "$@"
|
Loading…
Reference in New Issue
Block a user