Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ if [ $upgrade -eq 1 -a $makerfaire2018 -eq 0 -a -d ${home_dir}/wm8960 ]; then
echo "Updating sound driver - 2/14" > /tmp/pynab.upgrade
cd ${home_dir}/wm8960
sudo chown -R ${owner} .git
pull=`git pull`
if [ "$pull" != "Already up to date." ]; then
# First we want to be sure we know everything from the remote branch status
git fetch
# Then we can check if the status considers our clone behind the remote (or not)
if git status --branch --porcelain | grep -q "\[behind"; then
git pull # Making sure we update the clone to the latest before rebuilding
make && sudo make install && make clean
sudo touch /tmp/pynab.upgrade.reboot
fi
Expand All @@ -88,8 +91,11 @@ if [ $upgrade -eq 1 ]; then
if [ -d ${home_dir}/tagtagtag-ears ]; then
cd ${home_dir}/tagtagtag-ears
sudo chown -R ${owner} .git
pull=`git pull`
if [ "$pull" != "Already up to date." ]; then
# First we want to be sure we know everything from the remote branch status
git fetch
# Then we can check if the status considers our clone behind the remote (or not)
if git status --branch --porcelain | grep -q "\[behind"; then
git pull # Making sure we update the clone to the latest before rebuilding
make && sudo make install && make clean
sudo touch /tmp/pynab.upgrade.reboot
fi
Expand All @@ -112,8 +118,11 @@ if [ $upgrade -eq 1 ]; then
if [ -d ${home_dir}/cr14 ]; then
cd ${home_dir}/cr14
sudo chown -R ${owner} .git
pull=`git pull`
if [ "$pull" != "Already up to date." ]; then
# First we want to be sure we know everything from the remote branch status
git fetch
# Then we can check if the status considers our clone behind the remote (or not)
if git status --branch --porcelain | grep -q "\[behind"; then
git pull # Making sure we update the clone to the latest before rebuilding
make && sudo make install && make clean
sudo touch /tmp/pynab.upgrade.reboot
fi
Expand All @@ -136,8 +145,11 @@ if [ $upgrade -eq 1 ]; then
if [ -d ${root_dir}/nabblockly ]; then
cd ${root_dir}/nabblockly
sudo chown -R ${owner} .
pull=`git pull`
if [ "$pull" != "Already up to date." ]; then
# First we want to be sure we know everything from the remote branch status
git fetch
# Then we can check if the status considers our clone behind the remote (or not)
if git status --branch --porcelain | grep -q "\[behind"; then
git pull # Making sure we update the clone to the latest before rebuilding
./rebar3 release
fi
else
Expand Down
4 changes: 2 additions & 2 deletions upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ case $step in
done
sudo systemctl stop nabd.socket || echo -n ""
sudo systemctl stop nabd.service || echo -n ""

sudo -u ${owner} touch /tmp/pynab.upgrade
sudo chown ${owner} /tmp/pynab.upgrade
echo "Updating code - 1/?" > /tmp/pynab.upgrade
Expand All @@ -35,7 +35,7 @@ case $step in
else
git pull
fi

bash upgrade.sh "install"
;;
"install")
Expand Down