moving github script

This commit is contained in:
rootzoll
2021-06-24 21:20:48 +02:00
parent 5771035584
commit a971485c24
5 changed files with 15 additions and 15 deletions

12
FAQ.md
View File

@@ -415,13 +415,13 @@ For example if you want to make a build from the 'dev' branch you execute the fo
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 `/home/admin/XXsyncScripts.sh`
* 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 `patch`
* 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](README.md#build-the-sd-card-image) from the README but in the end run the command:
`wget --no-cache https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh false false [GITHUB-USERNAME] [BRANCH] lcd true true`
If you are then working in your forked repo and want to update the scripts on your RaspiBlitz with your latest repo changes, run `/home/admin/XXsyncScripts.sh` - That's OK as long as you don't make changes to the SD card build script - for that you would need to build a fresh SD card again from your repo.
If you are then working in your forked repo and want to update the scripts on your RaspiBlitz with your latest repo changes, run `patch` - That's OK as long as you don't make changes to the SD card build script - for that you would need to build a fresh SD card again from your repo.
## How can I checkout a new branch from the RaspiBlitz repo to my forked repo?
@@ -452,7 +452,7 @@ git remote set-url origin [THE-URL-OF-YOUR-FORKED-REPO]
Now to sync your branch namend BRANCH on your forked repo with your RaspiBlitz, you always just run:
```
/home/admin/XXsyncScripts.sh BRANCH
/home/admin/config.scripts/blitz.github.sh BRANCH
```
So your workflow can go like this: You write code on your local computer. Commit to your local repo, push it to your forked repo and use the sync-script above to get the code to your RaspiBlitz.
@@ -473,14 +473,14 @@ cd /home/admin/raspiblitz
git fetch origin pull/[PRNUMBER]/head:pr[PRNUMBER]
git checkout pr[PRNUMBER]
cd /home/admin
./XXsyncScripts.sh -justinstall
/home/admin/config.scripts/blitz.github.sh -justinstall
```
Now you have the code of the PR active - depending on what scripts are changed you might need to reboot.
To change back to the code:
```
./XXsyncScripts.sh master
/home/admin/config.scripts/blitz.github.sh master
```
## How to attach the RaspberryPi to the HDD?
@@ -839,7 +839,7 @@ https://seravo.fi/2015/using-raid-btrfs-recovering-broken-disks
## How do I fix a displayed Error in my Config?
When the LCD display is telling you to do a config check:
- go to the RaspiBlitz terminal (X on main menu) and run './XXsyncScripts.sh'
- go to the RaspiBlitz terminal (X on main menu) and run 'patch'
- start reboot with command: 'restart'
- go to the RaspiBlitz terminal run the command: 'check'
- now edit the RaspiBlitz config and get rid of the errors: 'nano /mnt/hdd/raspiblitz.conf'

View File

@@ -5,10 +5,10 @@ echo "************* Vagrant Provisioning ********************"
echo 'Syncing local code with RaspiBlitzVM'
# make sure the lastest sync script is in place
cp /vagrant/home.admin/XXsyncScripts.sh /home/admin/XXsyncScripts.sh
cp /vagrant/home.admin/config.scripts/blitz.github.sh /home/admin/config.scripts/blitz.github.sh
# execute 'patch' command to sync laptop with VM
/home/admin/XXsyncScripts.sh -run
/home/admin/config.scripts/blitz.github.sh -run
source <(/home/admin/config.scripts/internet.sh status)

View File

@@ -101,7 +101,7 @@ patch()
{
# get sync info
source <(sudo /home/admin/XXsyncScripts.sh info)
source <(sudo /home/admin/config.scripts/blitz.github.sh info)
# Patch Options
OPTIONS=(PATCH "Patch/Sync RaspiBlitz with GitHub Repo" \
@@ -115,7 +115,7 @@ patch()
clear
case $CHOICE in
PATCH)
sudo -u admin /home/admin/XXsyncScripts.sh -run
sudo -u admin /home/admin/config.scripts/blitz.github.sh -run
sleep 4
whiptail --title " Patching/Syncing " --yes-button "Reboot" --no-button "Skip Reboot" --yesno " OK patching/syncing done.
@@ -142,7 +142,7 @@ patch()
newGitHubUser=$(echo "${newGitHubUser}" | cut -d " " -f1)
echo "--> " ${newGitHubUser}
error=""
source <(sudo -u admin /home/admin/XXsyncScripts.sh -clean ${activeBranch} ${newGitHubUser})
source <(sudo -u admin /home/admin/config.scripts/blitz.github.sh -clean ${activeBranch} ${newGitHubUser})
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30
fi
@@ -159,7 +159,7 @@ patch()
newGitHubBranch=$(echo "${newGitHubBranch}" | cut -d " " -f1)
echo "--> " $newGitHubBranch
error=""
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${newGitHubBranch})
source <(sudo -u admin /home/admin/config.scripts/blitz.github.sh ${newGitHubBranch})
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30
fi
@@ -178,12 +178,12 @@ patch()
cd /home/admin/raspiblitz
git fetch origin pull/${pullRequestID}/head:pr${pullRequestID}
error=""
source <(sudo -u admin /home/admin/XXsyncScripts.sh pr${pullRequestID})
source <(sudo -u admin /home/admin/config.scripts/blitz.github.sh pr${pullRequestID})
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30
else
echo "# update installs .."
/home/admin/XXsyncScripts.sh -justinstall
/home/admin/config.scripts/blitz.github.sh -justinstall
fi
fi
exit 1

View File

@@ -60,7 +60,7 @@ function debug() {
# syncs script with latest set github and branch
function patch() {
cd /home/admin
./XXsyncScripts.sh -run
/home/admin/config.scripts/blitz.github.sh
}
# command: off