You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.3 KiB
51 lines
1.3 KiB
# vim: ft=sh |
|
|
|
# Folders |
|
AURDIR="$HOME/aur" |
|
AURDEST="$AURDIR/Pkgbuilds" |
|
PKGDEST="$AURDIR/Packages" |
|
SRCDEST="$AURDIR/Source" |
|
ABSDEST="$AURDIR/ABS" |
|
GNUPGHOME="$AURDIR/gnupg" |
|
CUSTOMDIR="$HOME/Development/custom-pkgbuilds" |
|
|
|
# Local options |
|
test -e "$DOTFILES/etc/aur.conf.local" && |
|
source "$DOTFILES/etc/aur.conf.local" |
|
|
|
# Create directories |
|
test -d "$AURDEST" || mkdir -p "$AURDEST" || exit 1 |
|
test -d "$PKGDEST" || mkdir -p "$PKGDEST" || exit 1 |
|
test -d "$SRCDEST" || mkdir -p "$SRCDEST" || exit 1 |
|
|
|
# GnuPG Signatures |
|
export GNUPGHOME |
|
|
|
test -d "$GNUPGHOME" || mkdir -p "$GNUPGHOME" && chmod go-w "$GNUPGHOME" || exit 1 |
|
|
|
if ! test -e "$GNUPGHOME/gpg.conf"; then |
|
echo "[AUR] Initializing GnuPG keyring in $GNUPGHOME" |
|
cat >"$GNUPGHOME/gpg.conf" <<EOF |
|
no-greeting |
|
keyserver hkp://pool.sks-keyservers.net |
|
keyserver-options auto-key-retrieve |
|
personal-cipher-preferences AES256 AES192 AES |
|
personal-digest-preferences SHA512 SHA384 SHA256 |
|
cert-digest-algo SHA512 |
|
EOF |
|
if [ "$?" -eq 0 ]; then |
|
dirmngr </dev/null >/dev/null || exit 1 |
|
else |
|
echo "Failed to initialize aur.sh GnuPG keyring" |
|
exit 1 |
|
fi |
|
fi |
|
|
|
# ABS |
|
if which asp >/dev/null 2>&1; then |
|
export ASPROOT="$ABSDEST/.asp" |
|
|
|
test -d "$ABSDEST" || mkdir -p "$ABSDEST" || exit 1 |
|
test -d "$ASPROOT" || mkdir -p "$ASPROOT" || exit 1 |
|
fi |
|
|
|
|