Skip to content

Commit

Permalink
Updates to bootstrap.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Sep 18, 2015
1 parent 8cde212 commit 02efd11
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions scripts/bootstrap.sh
@@ -1,21 +1,38 @@
#!/bin/bash

set -x
set -e

GIT_REPO=https://github.com/timvideos/HDMI2USB-misoc-firmware.git
GIT_BRANCH=master
if [ -z "$GIT_BRANCH" ]; then
GIT_BRANCH=master
fi

sudo apt-get install -y git realpath
TMOUT=5

if ! git help > /dev/null 2>&1; then
yn=y
read -p "Install git to checkout the repository? (y/n) " yn
if [ "$yn" = "y" -o "$yn" = "Y" ]; then
sudo apt-get install -y git || exit 1
else
echo "Aborting.."
exit 1
fi
fi

if [ -e HDMI2USB-misoc-firmware ]; then
cd HDMI2USB-misoc-firmware
git pull
git pull || exit 1
else
git clone $GIT_REPO
git clone $GIT_REPO || exit 1
cd HDMI2USB-misoc-firmware
git checkout $GIT_BRANCH || exit 1
fi

git checkout $GIT_BRANCH
./scripts/get-env.sh

yn=y
read -p "Need to install packages as root. Continue? (y/n) " yn
if [ "$yn" = "y" -o "$yn" = "Y" -o -z "$yn" ]; then
sudo ./scripts/get-env-root.sh || exit 1
else
echo "Aborting.."
exit 1
fi
./scripts/get-env.sh || exit 1

0 comments on commit 02efd11

Please sign in to comment.