File: install.tcl

package info (click to toggle)
borgbackup2 2.0.0b20-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 16,848 kB
  • sloc: python: 33,830; pascal: 3,599; sh: 215; makefile: 160; tcl: 94; ansic: 21
file content (38 lines) | stat: -rw-r--r-- 1,307 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Configuration for send -h
# Tries to emulate a human typing
# Tweak this if typing is too fast or too slow
set send_human {.05 .1 1 .01 .2}

set script [string trim {
# This asciinema will show you the installation of borg as a standalone binary. Usually you only need this if you want to have an up-to-date version of borg or no package is available for your distro/OS.

# First, we need to download the version, we'd like to install…
wget -q --show-progress https://github.com/borgbackup/borg/releases/download/1.2.1/borg-linux64
# and do not forget the GPG signature…!
wget -q --show-progress https://github.com/borgbackup/borg/releases/download/1.2.1/borg-linux64.asc

# In this case, we have already imported the public key of a borg developer. So we only need to verify it:
gpg --verify borg-linux64.asc
# Okay, the binary is valid!

# Now install it:
sudo cp borg-linux64 /usr/local/bin/borg
sudo chown root:root /usr/local/bin/borg
# and make it executable…
sudo chmod 755 /usr/local/bin/borg

# Now check it: (possibly needs a terminal restart)
borg -V

# That's it! Now check out the other screencasts to see how to use borgbackup.
}]

# wget may be slow
set timeout -1

foreach line [split $script \n] {
	send_user "$ "
	send_user -h $line\n
	spawn -noecho /bin/sh -c $line
	expect eof
}