aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 92cf252b3e5b97361fd1321fcc9e994a74b44cea (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Unofficial Client for slackware.com
===================================

A minimalistic tool for interfacing with Slackware's mirrors and website from the command line.
Use at your own risk.

Note: Currently this project is pre-release and may be vulnerable to downgrade attacks.

```
  slackware.com [command]

          changelog
                  - show changes described in the Changelog since the last update
          download
                  - download the given packages
          help
                  - list commands offered by this tool
          list
                  - print all packages on the mirror
          sync
                  - update knowledge about mirror's content
          updates
                  - print all new and updated packages on mirror

  Environment Variables

          PACKAGE_CACHE ($ROOT/var/cache/packages)
                  - local directory for downloads
          QUIET (false)
                  - turn off informational output: 'false' or 'true'
          ROOT (/)
                  - target root directory
          SLACKWARE_MIRROR (https://download.dlackware.com/slackware/slackware-current/)
                  - remote root slackware package location
```

Examples
--------

Download all updates:
```
slackware.com updates | xargs slackware.com download
```

Cron script to download updates and email changes to root:
```
#!/bin/sh
set -e

export QUIET=true
export SLACKWARE_MIRROR=https://download.dlackware.com/slackware/slackware-current/
export PATH=$PATH:/usr/local/sbin

slackware.com sync
TO_UPDATE="$(slackware.com updates)"
if [ -n "$TO_UPDATE" ]; then
	slackware.com updates | xargs slackware.com download
	slackware.com changelog | mail -s "updates" root
fi
```

Installation
------------

Download the slackware.com script, and copy it to /usr/local/sbin:

```
chmd +x slackware.com
mv slackware.com /usr/local/sbin
```

Import Slackware's GPG key for the user running the tool:

```
gpg2 --keyserver pgp.mit.edu --recv-keys 0x6A4463C040102233
```