Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
crschardt committed Jan 27, 2025
1 parent 7bfafcc commit d957392
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,6 @@ install_if_missing() {
debug "$1 installation complete."
}

get_photonvision_releases() {
# Return cached input
if [ -n "$PHOTON_VISION_RELEASES" ] ; then
echo "$PHOTON_VISION_RELEASES"
return
fi

# Use curl if available, otherwise fallback to wget
if command -v curl > /dev/null 2>&1 ; then
PHOTON_VISION_RELEASES="$(curl -sk https://api.github.com/repos/photonvision/photonvision/releases)"
else
PHOTON_VISION_RELEASES="$(wget -qO- https://api.github.com/repos/photonvision/photonvision/releases)"
fi

echo "$PHOTON_VISION_RELEASES"
}

get_versions() {
PHOTON_VISION_RELEASES="$(wget -qO- https://api.github.com/repos/photonvision/photonvision/releases?per_page=$1)"

Expand Down Expand Up @@ -185,6 +168,8 @@ while getopts "hlv:a:mnqt-:" OPT; do
esac
done

debug "This is the installation script for PhotonVision."

if [[ "$(id -u)" != "0" && -z $TEST ]]; then
die "This script must be run as root"
fi
Expand Down Expand Up @@ -212,7 +197,6 @@ else
"Run './install.sh -h' for more information."
fi

debug "This is the installation script for PhotonVision."
debug "Installing for platform $ARCH"

# make sure that we are downloading a valid version
Expand Down Expand Up @@ -278,7 +262,7 @@ if [[ -z $TEST ]]; then
fi

if [[ "$INSTALL_NETWORK_MANAGER" == "yes" ]]; then
debug "NetworkManager installation specified. Installing components..."
debug "NetworkManager installation requested. Installing components..."
install_if_missing network-manager
install_if_missing net-tools

Expand Down Expand Up @@ -330,14 +314,12 @@ if [[ -z $TEST ]]; then
# service --status-all doesn't list photonvision on OrangePi use systemctl instead:
if [[ $(systemctl --quiet is-active photonvision) = "active" ]]; then
debug "PhotonVision is already running. Stopping service."
if [[ -z $TEST ]]; then
systemctl stop photonvision
systemctl disable photonvision
rm /lib/systemd/system/photonvision.service
rm /etc/systemd/system/photonvision.service
systemctl daemon-reload
systemctl reset-failed
fi
fi

cat > /lib/systemd/system/photonvision.service <<EOF
Expand Down

0 comments on commit d957392

Please sign in to comment.