Ostatnio aktywny 1747055153

upgrade snac from source to current head state (to test beta)

santiago's Avatar santiago zrewidował ten Gist 1747055153. Przejdź do rewizji

Brak zmian

santiago's Avatar santiago zrewidował ten Gist 1747055130. Przejdź do rewizji

1 file changed, 37 insertions

upgrade_snac_to_head.sh(stworzono plik)

@@ -0,0 +1,37 @@
1 + "upgrade_snac_to_head.sh" 36L, 604B 16,30 All
2 + #!/usr/bin/env bash
3 +
4 + #Pre existing cloned repo
5 + cd $HOME/snac2
6 +
7 + SNAC_USER=snac
8 + SNAC_DATA=/home/snac/data
9 +
10 + separator() {
11 + printf '=%.0s' $(seq $(tput cols))
12 + echo
13 + }
14 +
15 +
16 + git fetch
17 + git reset --hard origin/master
18 + echo "Building..."
19 + make && sudo make install
20 +
21 +
22 + separator
23 + echo "Release notes (10 lines)"
24 + separator
25 + head RELEASE_NOTES.md -n 10
26 +
27 + separator
28 + echo "Upgrading snac data folder (user: $SNAC_USER data: $SNAC_DATA)..."
29 + sudo -u $SNAC_USER snac upgrade $SNAC_DATA
30 +
31 + separator
32 + echo "Restarting service..."
33 + sudo systemctl restart snac.service
34 +
35 + separator
36 + sudo -u $SNAC_USER snac state $SNAC_DATA
37 + separator
Nowsze Starsze