automation of updates and aliasing
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
26b8700455
commit
38e95f58ed
24
update.sh
Normal file
24
update.sh
Normal file
@ -0,0 +1,24 @@
|
||||
echo "[+] trying to fetch main branch"
|
||||
git fetch origin main
|
||||
|
||||
if [ $(git rev-list --count HEAD..origin/main) -gt 0 ]; then
|
||||
echo "[+] pulling latest version of the main branch"
|
||||
git pull origin main
|
||||
else
|
||||
echo "[+] nothing to update from the remote repository"
|
||||
fi
|
||||
|
||||
echo "[+] build for the new version starts in 3 seconds..."
|
||||
sleep 3
|
||||
cargo build --release
|
||||
|
||||
echo "[+] need to store the 'ghost-eye' binary to '/usr/local/bin/'"
|
||||
sudo cp target/release/ghost-eye /usr/local/bin
|
||||
|
||||
if ! grep -Fxq "alias ge=\"ghost-eye\"" ~/.bashrc; then
|
||||
echo "alias ge=\"ghost-eye\"" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
echo "[+] alias ge added, type ge to run ghost-eye"
|
||||
else
|
||||
echo "[+] alias ge already found"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user