Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #263 from ludeeus/use-osrelease-var-for-repo
Browse files Browse the repository at this point in the history
hassbian-script: Use osrelease to select stretch/buster
  • Loading branch information
Landrash committed Apr 21, 2019
2 parents a66c964 + 76226de commit 3d92d92
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package/opt/hassbian/suites/hassbian-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ if [ "$DEV" == "true" ]; then
return 0
fi
fi

OSRELEASE=$(lsb_release -cs)

echo "Updating apt information..."
echo "deb [trusted=yes] https://gitlab.com/hassbian/repository$devbranch/raw/master stretch main" | tee /etc/apt/sources.list.d/hassbian.list
echo "deb [trusted=yes] https://gitlab.com/hassbian/repository$devbranch/raw/master $OSRELEASE main" | tee /etc/apt/sources.list.d/hassbian.list
apt update

echo "Checking installed version..."
Expand All @@ -37,7 +40,7 @@ if [ "$current_version" != "installed" ]; then
apt clean

echo "Installing newest version of hassbian-scripts..."
echo "deb [trusted=yes] https://gitlab.com/hassbian/repository$devbranch/raw/master stretch main" | tee /etc/apt/sources.list.d/hassbian.list
echo "deb [trusted=yes] https://gitlab.com/hassbian/repository$devbranch/raw/master $OSRELEASE main" | tee /etc/apt/sources.list.d/hassbian.list
apt update
apt install -y hassbian-scripts
else
Expand Down

0 comments on commit 3d92d92

Please sign in to comment.