From 9fd9fb16704cc959df4d37ac46606d5bc1abf46d Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Tue, 30 Nov 2021 15:27:20 +0000 Subject: [PATCH] copy systematically and unify script permissions (#2746) --- build_sdcard.sh | 13 +++++++------ home.admin/config.scripts/blitz.github.sh | 18 +++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 34a60dfe..a01097c9 100755 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -613,15 +613,16 @@ echo "*** SHELL SCRIPTS & ASSETS ***" cd /home/admin/ sudo -u admin git config --global user.name "${githubUser}" sudo -u admin git config --global user.email "johndoe@example.com" -sudo -u admin rm -rf /home/admin/raspiblitz +sudo rm -rf /home/admin/raspiblitz sudo -u admin git clone -b ${githubBranch} https://github.com/${githubUser}/raspiblitz.git -sudo -u admin cp -r /home/admin/raspiblitz/home.admin/*.* /home/admin -sudo -u admin cp -r /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin -sudo -u admin chmod +x *.sh sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/ +sudo -u admin cp /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin +sudo -u admin cp /home/admin/raspiblitz/home.admin/*.* /home/admin +sudo -u admin chmod 755 *.sh sudo -u admin cp -r /home/admin/raspiblitz/home.admin/config.scripts /home/admin/ -sudo -u admin chmod +x /home/admin/config.scripts/*.sh -sudo -u admin chmod +x /home/admin/setup.scripts/*.sh +sudo -u admin chmod 755 /home/admin/config.scripts/*.sh +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/setup.scripts /home/admin/ +sudo -u admin chmod 755 /home/admin/setup.scripts/*.sh # install newest version of BlitzPy blitzpy_wheel=$(ls -tR /home/admin/raspiblitz/home.admin/BlitzPy/dist | grep -E "*any.whl" | tail -n 1) diff --git a/home.admin/config.scripts/blitz.github.sh b/home.admin/config.scripts/blitz.github.sh index 971cd942..ee279ad5 100755 --- a/home.admin/config.scripts/blitz.github.sh +++ b/home.admin/config.scripts/blitz.github.sh @@ -151,10 +151,11 @@ else fi if [ ${clean} -eq 1 ]; then - echo "# Cleaning assets .. " + echo "# Cleaning scripts and assets .. " sudo rm -f *.sh sudo rm -rf assets - sudo -u admin mkdir assets + sudo rm -rf /home/admin/config.scripts + sudo rm -rf /home/admin/setup.scripts else echo "# ******************************************" echo "# NOT cleaning/deleting old files" @@ -163,11 +164,14 @@ else fi echo "# COPYING from GIT-Directory to /home/admin/" -sudo rm -r /home/admin/config.scripts -sudo -u admin cp -r -f /home/admin/raspiblitz/home.admin/* /home/admin -sudo -u admin chmod -R +x /home/admin/config.scripts -sudo -u admin chmod -R +x /home/admin/setup.scripts -sudo -u admin chmod +x /home/admin/*.sh +sudo -u admin cp /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/ +sudo -u admin cp /home/admin/raspiblitz/home.admin/*.* /home/admin +sudo -u admin chmod 755 *.sh +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/config.scripts /home/admin/ +sudo -u admin chmod 755 /home/admin/config.scripts/*.sh +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/setup.scripts /home/admin/ +sudo -u admin chmod 755 /home/admin/setup.scripts/*.sh echo "# ******************************************" echo "# Syncing Webcontent .."