Merge pull request #452 from TotallyNotElite/testingbranch01

Streamline cathook update process
This commit is contained in:
LightCat 2018-05-21 11:40:34 +02:00 committed by GitHub
commit b5c5927c5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 1 deletions

View File

@ -8,6 +8,8 @@ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sud
# Install libglez # Install libglez
# #
mkdir cathook; cd cathook
git clone --recursive https://github.com/nullworks/libglez.git;cd libglez;mkdir build;cd build;cmake ..;make;sudo make install;cd ..;cd .. git clone --recursive https://github.com/nullworks/libglez.git;cd libglez;mkdir build;cd build;cmake ..;make;sudo make install;cd ..;cd ..
# #
@ -26,4 +28,12 @@ git clone --recursive https://github.com/nullworks/simple-ipc.git;cd simple-ipc;
# Build cathook # Build cathook
# #
git clone --recursive https://github.com/nullworks/cathook.git;cd cathook;mkdir build;cd build;cmake ..;make -j$(grep -c '^processor' /proc/cpuinfo); sudo make data git clone --recursive https://github.com/nullworks/cathook.git;cd cathook;mkdir build;cd build;cmake ..;make -j$(grep -c '^processor' /proc/cpuinfo); sudo make data; cd ..; cd ..
#
# Do post installation stuff
#
cp -a -u ./cathook/tools/. ./
rm ./README
cd ..; rm install-all

1
tools/README Normal file
View File

@ -0,0 +1 @@
These files are not intended to be run from this folder.

4
tools/attach Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd cathook
sudo bash attach

7
tools/update Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
rm ./updater.sh
wget https://raw.githubusercontent.com/nullworks/cathook/master/tools/updater.sh
updater() {
source updater.sh
}
updater

53
tools/updater.sh Executable file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
sudo echo Elevated
cd libglez
git fetch >update.log
if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
if ! git submodule update --remote --recursive >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
cd build; cmake ..; make;sudo make install;cd ..; cd ..
cd libxoverlay
git fetch >update.log
if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
if ! git submodule update --remote --recursive >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
cd build; cmake ..; make;sudo make install;cd ..; cd ..
cd simple-ipc
git fetch >update.log
if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
if ! git submodule update --remote --recursive >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
cd build; cmake ..; make;sudo make install;cd ..; cd ..
cd cathook
git fetch >update.log
if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
if ! git submodule update --remote --recursive >>update.log; then
$DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78
exit
fi
cd build; cmake ..; make; cd ..; cd ..
cp -a -u ./cathook/tools/. ./; rm ./README; rm ./updater.sh