diff --git a/README.md b/README.md index 946b612..f980818 100644 --- a/README.md +++ b/README.md @@ -304,6 +304,16 @@ And if you are a developer - to build a sd card from the dev-branch use this com `wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh 'dev'` +## Working with a forked GitHub Repo + +If you fork the RaspiBlitz repo (much welcome) and you want to run that code on your RaspiBlitz, there are two ways to do that: + +* The quick way: For small changes in scripts, go to `/home/admin` on your running RaspiBlitz, delete the old git with `sudo rm -r raspiblitz` then replace it with your code `git clone [YOURREPO]` and `./XXupdateScripts.sh` + +* The long way: If you like to install/remove/change services and system configurations you need to build a SD card from your own code. Prepare like in `Build the SD Card Image` but in the end run the command: + +`wget https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/dev/build.sdcard/raspbianStretchDesktop.sh && sudo bash raspbianStretchDesktop.sh [BRANCH] [GITHUB-USERNAME]` + ## Update to a new SD Card Release At the beginning of this README you can find the newest SD card we provide. Or you can build the newest SD card image yourself like in the chapter above. The SD card image is used to setup a fresh install of the RaspiBlitz. So what to do if you already have an older version running and you want to upgrade? diff --git a/build.sdcard/raspbianStretchDesktop.sh b/build.sdcard/raspbianStretchDesktop.sh index 349a562..ac1a393 100644 --- a/build.sdcard/raspbianStretchDesktop.sh +++ b/build.sdcard/raspbianStretchDesktop.sh @@ -14,7 +14,7 @@ echo "* RASPIBLITZ SD CARD IMAGE SETUP v0.98 *" echo "*****************************************" echo "" -# 1st optional parameter is the branch to get code from when +# 1st optional parameter is the BRANCH to get code from when # provisioning sd card with raspiblitz assets/scripts later on echo "*** CHECK INPUT PARAMETERS ***" wantedBranch="$1" @@ -22,6 +22,17 @@ if [ ${#wantedBranch} -eq 0 ]; then wantedBranch="master" fi echo "will use code from branch --> '${wantedBranch}'" + +# 2nd optional parameter is the GITHUG-USERNAME to get code from when +# provisioning sd card with raspiblitz assets/scripts later on +# if 2nd paramter is used - 1st is mandatory +echo "*** CHECK INPUT PARAMETERS ***" +githubUser="$2" +if [ ${#githubUser} -eq 0 ]; then + githubUser="rootzoll" +fi +echo "will use code from user --> '${githubUser}'" + sleep 3 echo "" @@ -419,7 +430,7 @@ sudo bash -c "echo 'net.core.wmem_max = 1048576' >> /etc/sysctl.conf" # move files from gitclone cd /home/admin/ -sudo -u admin git clone -b ${wantedBranch} https://github.com/rootzoll/raspiblitz.git +sudo -u admin git clone -b ${wantedBranch} https://github.com/${githubUser}/raspiblitz.git sudo -u admin cp /home/admin/raspiblitz/home.admin/*.* /home/admin sudo -u admin chmod +x *.sh sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/