File indexing completed on 2025-01-05 04:33:33
0001 #!/bin/sh 0002 0003 set -e 0004 0005 [ -z "$1" ] && { echo "Usage: setup-cache.sh <pacserve ip>" 1>&2 ; exit 1 ; } 0006 [ "$UID" == "0" ] || { echo "Run me as root" 1>&2 ; exit 1 ; } 0007 0008 use_cache="$1" 0009 sed -r -e '1 i Server = http://'$use_cache':15678/pacman/$repo/$arch' -i /etc/pacman.d/mirrorlist 0010 sed -r -e '/^Server\s*=/ i Server = http://'$use_cache':15678/pacman/$repo' -i /etc/pacman.conf