Skip to content

Commit aa265eb

Browse files
committed
findupd: black-magic fuckery
1 parent d596956 commit aa265eb

File tree

3 files changed

+75
-12
lines changed

3 files changed

+75
-12
lines changed

findupd/README.md

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,83 @@
1-
## Update outdated packages
2-
1. go to aosc-os-abbs
1+
## Update Outdated Packages (Quick-n-Easy)
32

4-
```$ cd /var/lib/acbs/repo```
3+
1. Go to an ABBS tree
54

6-
2. Dump repology's outdated pkgs info. to local json file
5+
```$ cd /path/to/abbs-tree```
6+
7+
2. Move all scripts to $PATH (e.g. /usr/local/bin)
8+
9+
```
10+
$ mv findupd* /usr/local/bin
11+
$ mv *.py /usr/local/bin
12+
```
13+
14+
3. Check for updates
15+
16+
```
17+
# For all updates
18+
$ findupd
19+
20+
# For patch-level (a.k.a. stable-proposed) updates
21+
$ findupd-stable
22+
```
23+
24+
## Update Outdated Packages (Stick Shift Mastery)
25+
26+
1. Go to an ABBS tree
27+
28+
```$ cd /path/to/abbs-tree```
29+
30+
2. Move all scripts to $PATH (e.g. /usr/local/bin)
31+
32+
```
33+
$ mv findupd* /usr/local/bin
34+
$ mv *.py /usr/local/bin
35+
```
36+
37+
3. Dump repology's outdated pkgs info. to local json file
738

839
```$ python3 update-pkgs.py -d ../repology.json```
940

10-
3. Search repo's outdated pkgs and replace newest version. (e.g. In the extra-graphics only)
41+
4. Search for updates (e.g. In the extra-graphics only)
42+
1143
```
1244
$ python3 update-pkgs.py -j ../repology.json -c extra-graphics -r
1345
```
1446

15-
### Save update info. as file
47+
### Save Update Data Source to File
1648

1749
```
1850
$ python3 update-pkgs.py -j ../repology.json -s cache.txt
1951
```
2052

21-
### Save load cache file
53+
### Load Saved Data Source (as cache)
2254

2355
```
2456
$ python3 update-pkgs.py -l cache.txt -c extra-graphics -r -q
2557
```
2658

27-
### Support source https://packages.aosc.io/
59+
### Use AOSC OS Packages Site's Data Source
60+
2861
1. $ wget "https://packages.aosc.io/srcupd/aosc-os-abbs?type=json&page=all" -O packages.json
2962

3063
2. $ python3 update-pkgs.py -j ../packages.json -c extra-graphics -r
3164

32-
## Rebuild packages
65+
## Rebuild Packages
66+
3367
1. Dump the packages list to rebuild
68+
3469
```
3570
$ apt list $(apt-cache rdepends mlt | sort -u) > /path/to/mlt.txt
3671
```
3772

38-
2. go to aosc-os-abbs
73+
2. Go to an ABBS tree
74+
3975
```
40-
$ cd /var/lib/acbs/repo
76+
$ cd /path/to/abbs-tree
4177
```
4278

43-
3. Auto bump REL in repo
79+
3. Automatically bump REL in repo
80+
4481
```
4582
$ python3 rebuild.py /path/to/mlt.txt
4683
```

findupd/findupd

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
rm -rf /tmp/packages.json
4+
wget 'https://packages.aosc.io/srcupd/aosc-os-abbs?type=json&page=all' \
5+
-O /tmp/packages.json
6+
7+
update-pkgs.py -j /tmp/packages.json -s /tmp/cache.txt -q
8+
9+
for i in "$@"; do
10+
update-pkgs.py -l /tmp/cache.txt -c $i -r -q
11+
done
12+
13+
rm -rf /tmp/cache.txt

findupd/findupd-stable

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
rm -rf /tmp/packages.json
4+
wget 'https://packages.aosc.io/srcupd/aosc-os-abbs?type=json&page=all' \
5+
-O /tmp/packages.json
6+
7+
update-pkgs.py -p -j /tmp/packages.json -s /tmp/cache.txt -q
8+
9+
for i in "$@"; do
10+
update-pkgs.py -p -l /tmp/cache.txt -c $i -r -q
11+
done
12+
13+
rm -rf /tmp/cache.txt

0 commit comments

Comments
 (0)