copy systematically and unify script permissions (#2746)

This commit is contained in:
openoms 2021-11-30 15:27:20 +00:00 committed by GitHub
parent 8d92382911
commit 9fd9fb1670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

View File

@ -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)

View File

@ -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 .."