From b2b96f91eb17f4b9f8ce970ca45ad597870f4a8c Mon Sep 17 00:00:00 2001 From: polytan02 Date: Sat, 24 Dec 2016 14:00:03 +0000 Subject: [PATCH] Adjustment on download sequence --- scripts/install | 7 ++++--- scripts/upgrade | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 2df1e53..30875e3 100644 --- a/scripts/install +++ b/scripts/install @@ -101,14 +101,15 @@ sudo mkdir -p $final_path # We download the sources and go to latest revision sudo rm -rf ./gitsources sudo mkdir gitsources +sudo chmod 777 gitsources # We get the repository address URL=`sudo cat ../sources/source_url`; sudo git clone $URL gitsources # We reset to the latest known revision -sudo cd gitsources +cd gitsources SHA1=`sudo cat ../sources/source_sha1`; -git reset --hard $SHA1 -sudo cd .. +sudo git reset --hard $SHA1 +cd .. # We copy the sources to the destination sudo cp -a gitsources/* $final_path diff --git a/scripts/upgrade b/scripts/upgrade index 8504fd3..5c2bc0a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -34,14 +34,15 @@ sudo mkdir -p $final_path # We download the sources and go to latest revision sudo rm -rf ./gitsources sudo mkdir gitsources +sudo chmod 777 gitsources # We get the repository address URL=`sudo cat ../sources/source_url`; sudo git clone $URL gitsources # We reset to the latest known revision -sudo cd gitsources +cd gitsources SHA1=`sudo cat ../sources/source_sha1`; -git reset --hard $SHA1 -sudo cd .. +sudo git reset --hard $SHA1 +cd .. # Set permissions sudo chmod 775 -R $final_path