-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkout-all-specs
executable file
·26 lines (24 loc) · 1.08 KB
/
checkout-all-specs
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
#!/bin/bash
# Checkout all spec files into subdirectories under the current directory.
#
# Copyright © 2014–2022 Daniel Fandrich.
# This program is free software; you can redistribute it and/or modify
# Licensed under GNU General Public License 2.0 or later.
# Some rights reserved. See COPYING.
#
# This is needed to bootstrap a spec directory. To update them later, run
# update-all-specs and checkout-new-specs, which should be slightly more
# efficient. This creates a "spec only" style tree.
#
# There is an unofficial daily snapshot available at
# https://pkgsubmit.mageia.org/specs/cauldron-sparse-svn-snapshot.tar.xz that
# extracts into a "massive checkout" style tree of .spec files as an
# alternative.
set -e
#export BASE_SVN='svn+ssh://svn.mageia.org/svn/packages/cauldron/'
export BASE_SVN='svn://svn.mageia.org/svn/packages/cauldron/'
readonly SPECSLIST="$(mktemp)"
trap 'rm -f "${SPECSLIST}"' EXIT
svn ls "$BASE_SVN" >"${SPECSLIST}"
echo $(wc -l "${SPECSLIST}" | awk '{print $1}') packages to check/download
xargs -n1 -i{} -P4 sh -c "svn co '$BASE_SVN'{}current/SPECS {}" <"${SPECSLIST}"