Skip to content

Commit 4e3f7d3

Browse files
committed
Helper scripts
1 parent a0c7795 commit 4e3f7d3

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

genrepo.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/bash
2+
3+
pkgs=('apm'
4+
'atom'
5+
'electron'
6+
)
7+
8+
add=()
9+
10+
mkdir -p repository
11+
12+
for pkg in "${pkgs[@]}"; do
13+
source ${pkg}/PKGBUILD
14+
path="${pkgname}-${pkgver}-${pkgrel}-x86_64.pkg.tar.xz"
15+
if [ ! -e "repository/${path}" ]; then
16+
echo "Copying ${path}..."
17+
cp ${pkg}/${path} repository
18+
add+=("${path}")
19+
fi
20+
if [ ! -e "repository/${path}.sig" ]; then
21+
echo "Signing ${path}..."
22+
(cd repository; gpg2 --detach-sign ${path})
23+
fi
24+
done
25+
26+
if [ ${#add[@]} -ne 0 ]; then
27+
cd repository
28+
add_args='--sign --verify --delta --remove'
29+
repo-add ${add_args} atom.db.tar.xz ${add[@]}
30+
fi

sync.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/bash
2+
3+
repo_host='[email protected]'
4+
repo_name='atom'
5+
repo_path="/srv/noaxiom/${repo_name}"
6+
7+
rsync_args=('-rtlvH'
8+
'--delete-after'
9+
'--delay-updates'
10+
'--safe-links'
11+
'--max-delete=1000'
12+
)
13+
14+
arch='x86_64'
15+
echo "Syncing ${arch} repository..."
16+
if [ -d repository ]; then
17+
cd repository
18+
rsync "${rsync_args[@]}" . "${repo_host}:${repo_path}/${arch}"
19+
fi

0 commit comments

Comments
 (0)