mirror of
https://github.com/livingcomputermuseum/UniBone.git
synced 2026-01-28 04:47:46 +00:00
GitHub usability
This commit is contained in:
29
github-sync.sh
Normal file
29
github-sync.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
GITURL=https://github.com/j-hoppe/UniBone.git
|
||||
echo "This script updates local files from GitHub"
|
||||
echo " $GITURL"
|
||||
echo "It forces all local files also present on GitHub to latest version,"
|
||||
echo "then a full recompile is started."
|
||||
echo "This will both:"
|
||||
echo " - update all sources and scripts to latest published state."
|
||||
echo " - roll back local changes made in scripts and some disk images."
|
||||
echo "Files not (anymore) on GitHub are not touched."
|
||||
read -p "Are you sure [y/*] ? "
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]] ; then
|
||||
echo "OK, abort."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# make sure we have svn
|
||||
sudo apt install subversion
|
||||
|
||||
# download from github without creating repository
|
||||
svn export --force ${GITURL}/trunk .
|
||||
# This will not clear outdated files, they will remain as junk.
|
||||
|
||||
# Assure all shell scripts are executable
|
||||
find . -name '*.sh' -exec chmod +x '{}' \;
|
||||
|
||||
# Start recompile.
|
||||
./compile.sh -a
|
||||
Reference in New Issue
Block a user