summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-01-21 14:40:30 +0000
committerdavidovski <david@davidovski.xyz>2023-01-21 14:40:30 +0000
commitcaa260edd5b9b49f1f4c3d78022805ceee38a0e3 (patch)
treee57788a1abd7f84391776e31ef26962f163774e9
parente7be433c4aefb0a72f8a6b27e2aa15dd842fc2de (diff)
Fix mirror layout and add keychain
-rw-r--r--src/mirror.sh10
-rwxr-xr-xsrc/sync.sh6
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mirror.sh b/src/mirror.sh
index 7a2a672..b2b7c80 100644
--- a/src/mirror.sh
+++ b/src/mirror.sh
@@ -18,12 +18,16 @@ create_deps_graph () {
mirror () {
local MIRROR_DIR=${SYSROOT}${1:-$MIRROR_DIR}
- mkdir -p $MIRROR_DIR
- create_deps_graph > $MIRROR_DIR/deps.graph
+ mkdir -p $MIRROR_DIR/repo
+ create_deps_graph > $MIRROR_DIR/repo/deps.graph
+
+ mkdir -p $MIRROR_DIR/keychain
+ cp -r $KEYCHAIN_DIR/* $MIRROR_DIR/keychain/
local packages=$(list)
- cd $MIRROR_DIR
+ cd $MIRROR_DIR/repo
fetch $packages
cd -
+
}
diff --git a/src/sync.sh b/src/sync.sh
index 0be6c83..9f3ba29 100755
--- a/src/sync.sh
+++ b/src/sync.sh
@@ -78,11 +78,12 @@ popularity_contest () {
fi
local list=$(ls -1 -d $PACKAGES_DIR/*)
- local total=$(echo $list | wc -l)
+ set -- $list
+ local total=$#
local completed=0
for package_dir in $list; do
- contest $package_dir &
+ contest $package_dir
completed=$((completed+1))
${QUIET} || hbar -T "${LARGE_CIRCLE} contesting packages..." $completed $total
done
@@ -132,7 +133,6 @@ sync () {
# index packages and dependencies
${QUIET} || hbar
- ${QUIET} || hbar
index_repo 1 &
index_deps 0 &