mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
68 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6da47a8f6a | ||
![]() |
6350ec0461 | ||
![]() |
3da3a5486f | ||
![]() |
7020d2351b | ||
![]() |
7952d6fbfc | ||
![]() |
3c175e98bd | ||
![]() |
ddb08cb9a1 | ||
![]() |
88a929cfc0 | ||
![]() |
c24209028a | ||
![]() |
61010062ff | ||
![]() |
6ef4d5f30b | ||
![]() |
40ddf4d44f | ||
![]() |
b445920d55 | ||
![]() |
7887d9bb47 | ||
![]() |
35573fe147 | ||
![]() |
5688152f41 | ||
![]() |
e1312ec493 | ||
![]() |
e652dc8085 | ||
![]() |
ba4f28cc43 | ||
![]() |
dc7b96e917 | ||
![]() |
cb25d50913 | ||
![]() |
c51cc8d365 | ||
![]() |
e64c1d33eb | ||
![]() |
19f3a868f4 | ||
![]() |
f1ee5208ed | ||
![]() |
b97b245d52 | ||
![]() |
ee970f0bde | ||
![]() |
35fc83ce7d | ||
![]() |
51b5d69cfc | ||
![]() |
30bcca88d3 | ||
![]() |
25aae4ecfe | ||
![]() |
c8ba49c6a1 | ||
![]() |
e63c5f26a2 | ||
![]() |
c9c4e8043c | ||
![]() |
2582637376 | ||
![]() |
74df2a90d8 | ||
![]() |
8384ad849d | ||
![]() |
1febb47b2c | ||
![]() |
c57284e053 | ||
![]() |
d177c87080 | ||
![]() |
4b24337a51 | ||
![]() |
9a29f624f1 | ||
![]() |
3040951ca0 | ||
![]() |
5d39ffb341 | ||
![]() |
7e5ae10b43 | ||
![]() |
ab5eb2e4de | ||
![]() |
a1a6a8eaca | ||
![]() |
6d4367de35 | ||
![]() |
5df1f9bd6d | ||
![]() |
9b33a29ea5 | ||
![]() |
3985129c3d | ||
![]() |
e197f6d34c | ||
![]() |
c45e5bbf22 | ||
![]() |
e380f396cf | ||
![]() |
d187cdbc38 | ||
![]() |
fee49075f0 | ||
![]() |
39ae6e23d6 | ||
![]() |
61cc1f3504 | ||
![]() |
7037948b65 | ||
![]() |
0e6780f2c8 | ||
![]() |
45c8269441 | ||
![]() |
7e3013b2ae | ||
![]() |
c16e7c25c9 | ||
![]() |
c955ecf35d | ||
![]() |
160e936bba | ||
![]() |
69f9e64aa3 | ||
![]() |
71efb148df | ||
![]() |
48ccc1c7fb |
42
Makefile
42
Makefile
@@ -1,10 +1,11 @@
|
|||||||
V=0.9.19
|
V=0.9.27
|
||||||
|
|
||||||
|
PREFIX = /usr/local
|
||||||
|
|
||||||
BINPROGS = \
|
BINPROGS = \
|
||||||
checkpkg \
|
checkpkg \
|
||||||
commitpkg \
|
commitpkg \
|
||||||
archco \
|
archco \
|
||||||
communityco \
|
|
||||||
archrelease \
|
archrelease \
|
||||||
archrm \
|
archrm \
|
||||||
archbuild \
|
archbuild \
|
||||||
@@ -49,23 +50,32 @@ ARCHBUILD_LINKS = \
|
|||||||
all:
|
all:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -dm0755 $(DESTDIR)/usr/bin
|
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
install -dm0755 $(DESTDIR)/usr/sbin
|
install -dm0755 $(DESTDIR)$(PREFIX)/sbin
|
||||||
install -dm0755 $(DESTDIR)/usr/share/devtools
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools
|
||||||
install -m0755 ${BINPROGS} $(DESTDIR)/usr/bin
|
install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
|
||||||
install -m0755 ${SBINPROGS} $(DESTDIR)/usr/sbin
|
install -m0755 ${SBINPROGS} $(DESTDIR)$(PREFIX)/sbin
|
||||||
install -m0644 ${CONFIGFILES} $(DESTDIR)/usr/share/devtools
|
install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools
|
||||||
for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)/usr/bin/$$l; done
|
for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)/usr/bin/$$l; done
|
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
|
install -Dm0644 bash_completion $(DESTDIR)/etc/bash_completion.d/devtools
|
||||||
|
install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
||||||
|
ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
for f in ${BINPROGS}; do rm -f $(DESTDIR)/usr/bin/$$f; done
|
for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||||
for f in ${SBINPROGS}; do rm -f $(DESTDIR)/usr/sbin/$$f; done
|
for f in ${SBINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/sbin/$$f; done
|
||||||
for f in ${CONFIGFILES}; do rm -f $(DESTDIR)/usr/share/devtools/$$f; done
|
for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/$$f; done
|
||||||
for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)/usr/bin/$$l; done
|
for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)/usr/bin/$$l; done
|
for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
|
rm $(DESTDIR)/etc/bash_completion.d/devtools
|
||||||
|
rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
||||||
|
rm -f $(DESTDIR)$(PREFIX)/bin/communityco
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
|
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz
|
||||||
|
|
||||||
.PHONY: all install uninstall dist
|
upload:
|
||||||
|
scp devtools-$(V).tar.gz gerolde.archlinux.org:/srv/ftp/other/devtools/
|
||||||
|
|
||||||
|
.PHONY: all install uninstall dist upload
|
||||||
|
17
archco
17
archco
@@ -1,10 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
scriptname=${0##*/}
|
||||||
|
|
||||||
if [ "$1" = '' ]; then
|
if [ "$1" = '' ]; then
|
||||||
echo 'Usage: archco <package name> [<package name>]'
|
echo 'Usage: '$scriptname' <package name>...'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $scriptname in
|
||||||
|
archco)
|
||||||
|
SVNURL="svn+ssh://gerolde.archlinux.org/srv/svn-packages";;
|
||||||
|
communityco)
|
||||||
|
SVNURL="svn+ssh://aur.archlinux.org/srv/svn-packages";;
|
||||||
|
*)
|
||||||
|
echo "error: couldn't find svn url for $scriptname"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
svn co svn+ssh://gerolde.archlinux.org/srv/svn-packages/$i
|
svn co "$SVNURL/$i"
|
||||||
done
|
done
|
||||||
|
62
archrelease
62
archrelease
@@ -5,31 +5,63 @@ abort() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$1" = '' ]; then
|
if [[ -z $1 ]]; then
|
||||||
abort 'Usage: archrelease <repo>'
|
abort 'Usage: archrelease <repo>...'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f PKGBUILD ]; then
|
# TODO: validate repo is really repo-arch
|
||||||
|
|
||||||
|
if [[ ! -f PKGBUILD ]]; then
|
||||||
abort 'archrelease: PKGBUILD not found'
|
abort 'archrelease: PKGBUILD not found'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trunk=$(basename $(pwd))
|
trunk=${PWD##*/}
|
||||||
|
|
||||||
if [ "$(basename $(dirname $(pwd)))" == "repos" ]; then
|
# Normally this should be trunk, but it may be something
|
||||||
abort 'archrelease: Not in a package trunk dir'
|
# such as 'gnome-unstable'
|
||||||
|
IFS='/' read -r -d '' -a parts <<< "$PWD"
|
||||||
|
if [[ "${parts[@]:(-2):1}" == "repos" ]]; then
|
||||||
|
abort 'archrelease: Should not be in repos dir (try from trunk/)'
|
||||||
fi
|
fi
|
||||||
|
unset parts
|
||||||
|
|
||||||
if [ ! -z "$(svn status -q)" ]; then
|
if [[ $(svn status -q) ]]; then
|
||||||
abort 'archrelease: You have not committed your changes yet!'
|
abort 'archrelease: You have not committed your changes yet!'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n 'releasing package...'
|
|
||||||
pushd .. >/dev/null
|
pushd .. >/dev/null
|
||||||
if [ -d "repos/${1}" ]; then
|
IFS=$'\n' read -r -d '' -a known_files < <(svn ls -r HEAD "$trunk")
|
||||||
svn rm --force -q "repos/${1}"
|
for file in "${known_files[@]}"; do
|
||||||
svn commit -q -m "archrelease: remove ${1}" || abort
|
if [[ ${file:(-1)} = '/' ]]; then
|
||||||
fi
|
abort "archrelease: subdirectories are not supported in package directories!"
|
||||||
svn copy -q -r HEAD "${trunk}" "repos/${1}"
|
fi
|
||||||
svn commit -q -m "archrelease: copy ${trunk} to ${1}" || abort
|
done
|
||||||
popd >/dev/null
|
|
||||||
|
for tag in "$@"; do
|
||||||
|
echo -n "copying ${trunk} to ${tag}..."
|
||||||
|
|
||||||
|
if [[ -d repos/$tag ]]; then
|
||||||
|
declare -a trash
|
||||||
|
trash=()
|
||||||
|
while read -r file; do
|
||||||
|
trash+=("repos/$tag/$file")
|
||||||
|
done < <(svn ls "repos/$tag")
|
||||||
|
svn rm -q "${trash[@]}"
|
||||||
|
else
|
||||||
|
mkdir -p "repos/$tag"
|
||||||
|
svn add --parents -q "repos/$tag"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for file in "${known_files[@]}"; do
|
||||||
|
svn copy -q -r HEAD "$trunk/$file" "repos/$tag/"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo 'done'
|
||||||
|
done
|
||||||
|
|
||||||
|
echo -n "releasing package..."
|
||||||
|
printf -v tag_list ", %s" "$@"; tag_list="${tag_list#, }"
|
||||||
|
svn commit -q -m "archrelease: copy ${trunk} to $tag_list" || abort
|
||||||
echo 'done'
|
echo 'done'
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
|
69
bash_completion
Normal file
69
bash_completion
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
_devtools_compgen() {
|
||||||
|
local i r
|
||||||
|
COMPREPLY=($(compgen -W '$*' -- "$cur"))
|
||||||
|
for ((i=1; i < ${#COMP_WORDS[@]}-1; i++)); do
|
||||||
|
for r in ${!COMPREPLY[@]}; do
|
||||||
|
if [[ ${COMP_WORDS[i]} = ${COMPREPLY[r]} ]]; then
|
||||||
|
unset 'COMPREPLY[r]'; break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_archco_pkg() {
|
||||||
|
_devtools_compgen "$(
|
||||||
|
\pacman -$1
|
||||||
|
)"
|
||||||
|
}
|
||||||
|
|
||||||
|
_archco() {
|
||||||
|
local cur prev
|
||||||
|
COMPREPLY=()
|
||||||
|
cur=$(_get_cword)
|
||||||
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
|
_archco_pkg Slq
|
||||||
|
true
|
||||||
|
} &&
|
||||||
|
complete -F _archco archco communityco
|
||||||
|
|
||||||
|
_makechrootpkg() {
|
||||||
|
local cur
|
||||||
|
COMPREPLY=()
|
||||||
|
_get_comp_words_by_ref cur
|
||||||
|
|
||||||
|
case $cur in
|
||||||
|
-*)
|
||||||
|
COMPREPLY=( $( compgen -W '-I -c -d -h -l -r -u' -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_filedir
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
true
|
||||||
|
} &&
|
||||||
|
complete -F _makechrootpkg makechrootpkg
|
||||||
|
|
||||||
|
_mkarchroot() {
|
||||||
|
local cur
|
||||||
|
COMPREPLY=()
|
||||||
|
_get_comp_words_by_ref cur
|
||||||
|
|
||||||
|
case $cur in
|
||||||
|
-*)
|
||||||
|
COMPREPLY=( $( compgen -W '-C -M -c -f -h -n -r -u' -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_filedir
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
true
|
||||||
|
} &&
|
||||||
|
complete -F _mkarchroot mkarchroot
|
||||||
|
|
||||||
|
|
||||||
|
# ex:et ts=2 sw=2 ft=sh
|
77
checkpkg
77
checkpkg
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Source makepkg.conf; fail if it is not found
|
# Source makepkg.conf; fail if it is not found
|
||||||
if [ -r '/etc/makepkg.conf' ]; then
|
if [[ -r '/etc/makepkg.conf' ]]; then
|
||||||
source '/etc/makepkg.conf'
|
source '/etc/makepkg.conf'
|
||||||
else
|
else
|
||||||
echo '/etc/makepkg.conf not found!'
|
echo '/etc/makepkg.conf not found!'
|
||||||
@@ -9,88 +9,77 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Source user-specific makepkg.conf overrides
|
# Source user-specific makepkg.conf overrides
|
||||||
if [ -r ~/.makepkg.conf ]; then
|
if [[ -r ~/.makepkg.conf ]]; then
|
||||||
source ~/.makepkg.conf
|
source ~/.makepkg.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
strip_url() {
|
if [[ ! -f PKGBUILD ]]; then
|
||||||
echo $1 | sed 's|^.*://.*/||g'
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -f PKGBUILD ]; then
|
|
||||||
echo 'This must be run in the directory of a built package.'
|
echo 'This must be run in the directory of a built package.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. PKGBUILD
|
. PKGBUILD
|
||||||
if [ "$arch" == 'any' ]; then
|
if [[ $arch == 'any' ]]; then
|
||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STARTDIR=$(pwd)
|
STARTDIR=$(pwd)
|
||||||
TEMPDIR=$(mktemp -d /tmp/checkpkg-script.XXXX)
|
TEMPDIR=$(mktemp -d /tmp/checkpkg-script.XXXX)
|
||||||
cd $TEMPDIR
|
cd "$TEMPDIR"
|
||||||
|
|
||||||
for _pkgname in ${pkgname[@]}; do
|
for _pkgname in "${pkgname[@]}"; do
|
||||||
pkgfile=${_pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}
|
if [[ -z ${epoch} ]] ; then
|
||||||
oldstylepkgfile=${_pkgname}-${pkgver}-${pkgrel}${PKGEXT}
|
pkgfile=${_pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}
|
||||||
|
else
|
||||||
|
pkgfile=${_pkgname}-${epoch}:${pkgver}-${pkgrel}-${CARCH}${PKGEXT}
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$STARTDIR/$pkgfile" ]; then
|
if [[ -f "$STARTDIR/$pkgfile" ]]; then
|
||||||
cp "$STARTDIR/$pkgfile" .
|
ln -s "$STARTDIR/$pkgfile" "$pkgfile"
|
||||||
elif [ -f "$PKGDEST/$pkgfile" ]; then
|
elif [[ -f "$PKGDEST/$pkgfile" ]]; then
|
||||||
cp "$PKGDEST/$pkgfile" .
|
ln -s "$PKGDEST/$pkgfile" "$pkgfile"
|
||||||
elif [ -f "$STARTDIR/$oldstylepkgfile" ]; then
|
|
||||||
cp "$STARTDIR/$oldstylepkgfile" .
|
|
||||||
elif [ -f "$PKGDEST/$oldstylepkgfile" ]; then
|
|
||||||
cp "$PKGDEST/$oldstylepkgfile" .
|
|
||||||
else
|
else
|
||||||
echo "File \"$pkgfile\" doesn't exist"
|
echo "File \"$pkgfile\" doesn't exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmp=`pacman -Spd --noconfirm $_pkgname`
|
pkgurl=$(pacman -Spdd --print-format '%l' --noconfirm "$_pkgname")
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Couldn't download previous package for $_pkgname."
|
echo "Couldn't download previous package for $_pkgname."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkgurl=`echo $tmp | rev | cut -d ' ' -f 1 | rev`
|
oldpkg=${pkgurl##*://*/}
|
||||||
|
|
||||||
oldpkg=`strip_url $pkgurl`
|
if [[ ${oldpkg##*/} = ${pkgfile##*/} ]]; then
|
||||||
|
|
||||||
if [ "$(basename $oldpkg)" = "$(basename $pkgfile)" ]; then
|
|
||||||
echo "The built package ($_pkgname) is the one in the repo right now!"
|
echo "The built package ($_pkgname) is the one in the repo right now!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f $oldpkg ]; then
|
if [[ ! -f $oldpkg ]]; then
|
||||||
if echo $pkgurl | grep '^file:///' > /dev/null 2>&1; then
|
if [[ $pkgurl = file://* ]]; then
|
||||||
cp `echo $pkgurl | sed 's#^file://##'` .
|
ln -s "${pkgurl#file://}" "${pkgurl##file://*/}"
|
||||||
elif [ -f $PKGDEST/$oldpkg ]; then
|
elif [[ -f "$PKGDEST/$oldpkg" ]]; then
|
||||||
cp $PKGDEST/$oldpkg .
|
ln -s "$PKGDEST/$oldpkg" "$oldpkg"
|
||||||
elif [ -f $STARTDIR/$oldpkg ]; then
|
elif [[ -f "$STARTDIR/$oldpkg" ]]; then
|
||||||
cp $STARTDIR/$oldpkg .
|
ln -s "$STARTDIR/$oldpkg" "$oldpkg"
|
||||||
else
|
else
|
||||||
wget --quiet $pkgurl
|
wget --quiet "$pkgurl"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdtar tf $oldpkg > filelist-$_pkgname-old
|
bsdtar tf "$oldpkg" | sort > "filelist-$_pkgname-old"
|
||||||
bsdtar tf "$pkgfile" > filelist-$_pkgname
|
bsdtar tf "$pkgfile" | sort > "filelist-$_pkgname"
|
||||||
|
|
||||||
sort -o filelist-$_pkgname filelist-$_pkgname
|
sdiff -s "filelist-$_pkgname-old" "filelist-$_pkgname"
|
||||||
sort -o filelist-$_pkgname-old filelist-$_pkgname-old
|
|
||||||
|
|
||||||
sdiff -s filelist-$_pkgname-old filelist-$_pkgname
|
if diff "filelist-$_pkgname-old" "filelist-$_pkgname" | grep '\.so' > /dev/null 2>&1; then
|
||||||
|
|
||||||
if diff filelist-$_pkgname-old filelist-$_pkgname | grep '\.so' > /dev/null 2>&1; then
|
|
||||||
mkdir -p pkg
|
mkdir -p pkg
|
||||||
cd pkg
|
cd pkg
|
||||||
bsdtar xf ../"$pkgfile" > /dev/null
|
bsdtar xf ../"$pkgfile" > /dev/null
|
||||||
for i in `diff ../filelist-$_pkgname-old ../filelist-$_pkgname | grep \> | grep \.so | awk '{print $2}'`; do
|
diff "../filelist-$_pkgname-old" "../filelist-$_pkgname" | awk '/>.*\.so/{$1 = ""; print $0}' | while read i; do
|
||||||
echo -n "${i}: "
|
echo "${i}: " "$(objdump -p "$i" | grep SONAME)"
|
||||||
objdump -p $i | grep SONAME
|
|
||||||
done
|
done
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
|
158
commitpkg
158
commitpkg
@@ -51,44 +51,37 @@ fi
|
|||||||
. PKGBUILD
|
. PKGBUILD
|
||||||
pkgbase=${pkgbase:-$pkgname}
|
pkgbase=${pkgbase:-$pkgname}
|
||||||
|
|
||||||
# set up repo-specific opts depending on how we were called
|
case "$cmd" in
|
||||||
server='gerolde.archlinux.org'
|
commitpkg)
|
||||||
if [ "$cmd" == 'extrapkg' ]; then
|
if [ $# -eq 0 ]; then
|
||||||
repo='extra'
|
abort 'usage: commitpkg <reponame> [-l limit] [-a arch] [commit message]'
|
||||||
elif [ "$cmd" == 'corepkg' ]; then
|
fi
|
||||||
repo='core'
|
repo="$1"
|
||||||
elif [ "$cmd" == 'testingpkg' ]; then
|
shift
|
||||||
repo='testing'
|
;;
|
||||||
elif [ "$cmd" == 'stagingpkg' ]; then
|
*pkg)
|
||||||
repo='staging'
|
repo="${cmd%pkg}"
|
||||||
elif [ "$cmd" == 'communitypkg' ]; then
|
;;
|
||||||
repo='community'
|
*)
|
||||||
server='aur.archlinux.org'
|
abort 'usage: commitpkg <reponame> [-l limit] [-a arch] [commit message]'
|
||||||
elif [ "$cmd" == 'community-testingpkg' ]; then
|
;;
|
||||||
repo='community-testing'
|
esac
|
||||||
server='aur.archlinux.org'
|
|
||||||
elif [ "$cmd" == 'community-stagingpkg' ]; then
|
case "$repo" in
|
||||||
repo='community-staging'
|
core|extra|testing|staging)
|
||||||
server='aur.archlinux.org'
|
server='gerolde.archlinux.org' ;;
|
||||||
elif [ "$cmd" == 'multilibpkg' ]; then
|
community*|multilib*)
|
||||||
repo='multilib'
|
server='aur.archlinux.org' ;;
|
||||||
server='aur.archlinux.org'
|
*)
|
||||||
elif [ "$cmd" == 'multilib-testingpkg' ]; then
|
server='gerolde.archlinux.org'
|
||||||
repo='multilib-testing'
|
echo "Non-standard repository $repo in use, defaulting to server $server" ;;
|
||||||
server='aur.archlinux.org'
|
esac
|
||||||
else
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
abort 'usage: commitpkg <reponame> [-l limit] [commit message]'
|
|
||||||
fi
|
|
||||||
repo="$1"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check if all local source files are under version control
|
# check if all local source files are under version control
|
||||||
for s in ${source[@]}; do
|
for s in "${source[@]}"; do
|
||||||
echo $s | grep -Fvq '://' && \
|
if [[ $s != *://* ]] && ! svn status -v "$s" | grep -q '^[ AMRX~]'; then
|
||||||
svn status $s | grep -q '^\?' && \
|
abort "$s is not under version control"
|
||||||
abort "$s is not under version control"
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# check if changelog and install files are under version control
|
# check if changelog and install files are under version control
|
||||||
@@ -97,29 +90,58 @@ for i in 'changelog' 'install'; do
|
|||||||
for file in $filelist; do
|
for file in $filelist; do
|
||||||
# evaluate any bash variables used
|
# evaluate any bash variables used
|
||||||
eval file=${file}
|
eval file=${file}
|
||||||
if svn status ${file} | grep -q '^\?'; then
|
if ! svn status -v "${file}" | grep -q '^[ AMRX~]'; then
|
||||||
abort "${file} is not under version control"
|
abort "${file} is not under version control"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# see if any limit options were passed, we'll send them to rsync
|
# see if any limit options were passed, we'll send them to rsync
|
||||||
unset rsyncopts
|
rsyncopts=(-e ssh -p --chmod=ug=rw,o=r -c -h -L --progress --partial -y)
|
||||||
if [ "$1" = '-l' ]; then
|
while getopts ':l:a:' flag; do
|
||||||
rsyncopts="--bwlimit=$2"
|
case $flag in
|
||||||
shift 2
|
l) rsyncopts+=("--bwlimit=$2") ;;
|
||||||
|
a) commit_arch=$2 ;;
|
||||||
|
:) echo "option requires an argument -- '$OPTARG'" >&2
|
||||||
|
exit 1 ;;
|
||||||
|
\?) echo "invalid option -- '$OPTARG'" >&2
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $(( OPTIND - 1 ))
|
||||||
|
|
||||||
|
if [ -n "$(svn status -q)" ]; then
|
||||||
|
echo -n 'committing changes to trunk...'
|
||||||
|
msgtemplate="upgpkg: $pkgbase $(get_full_version ${epoch:-0} $pkgver $pkgrel)"$'\n\n'
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
svn commit -q -m "${msgtemplate}${1}" || abort
|
||||||
|
else
|
||||||
|
msgfile="$(mktemp)"
|
||||||
|
echo "$msgtemplate" > "$msgfile"
|
||||||
|
if [ -n "$SVN_EDITOR" ]; then
|
||||||
|
$SVN_EDITOR "$msgfile"
|
||||||
|
elif [ -n "$VISUAL" ]; then
|
||||||
|
$VISUAL "$msgfile"
|
||||||
|
elif [ -n "$EDITOR" ]; then
|
||||||
|
$EDITOR "$msgfile"
|
||||||
|
else
|
||||||
|
vi "$msgfile"
|
||||||
|
fi
|
||||||
|
[ -s "$msgfile" ] || abort
|
||||||
|
svn commit -q -F "$msgfile" || abort
|
||||||
|
unlink "$msgfile"
|
||||||
|
fi
|
||||||
|
echo 'done'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n 'committing changes to trunk...'
|
declare -a uploads
|
||||||
if [ -n "$1" ]; then
|
|
||||||
svn commit -q -m "upgpkg: $pkgbase $pkgver-$pkgrel
|
|
||||||
$1" || abort
|
|
||||||
else
|
|
||||||
svn commit -q || abort
|
|
||||||
fi
|
|
||||||
echo 'done'
|
|
||||||
|
|
||||||
for _arch in ${arch[@]}; do
|
for _arch in ${arch[@]}; do
|
||||||
|
if [ -n "$commit_arch" ] && [ "${_arch}" != "$commit_arch" ]; then
|
||||||
|
echo "skipping ${_arch}"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
for _pkgname in ${pkgname[@]}; do
|
for _pkgname in ${pkgname[@]}; do
|
||||||
fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
|
||||||
pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
|
pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
|
||||||
@@ -133,13 +155,36 @@ for _arch in ${arch[@]}; do
|
|||||||
echo "skipping ${_arch}"
|
echo "skipping ${_arch}"
|
||||||
continue 2
|
continue 2
|
||||||
fi
|
fi
|
||||||
|
uploads+=("$pkgfile")
|
||||||
|
|
||||||
echo -n 'uploading '
|
if [[ $SIGNPKG == 'y' ]]; then
|
||||||
rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
|
echo "Signing package ${pkgfile}..."
|
||||||
|
if [[ -n $GPGKEY ]]; then
|
||||||
|
SIGNWITHKEY="-u ${GPGKEY}"
|
||||||
|
fi
|
||||||
|
gpg --detach-sign --use-agent ${SIGNWITHKEY} "${pkgfile}" || abort
|
||||||
|
fi
|
||||||
|
|
||||||
|
sigfile="${pkgfile}.sig"
|
||||||
|
if [ -f "${sigfile}" ]; then
|
||||||
|
uploads+=("$sigfile")
|
||||||
|
elif [[ $SIGNPKG == 'y' ]]; then
|
||||||
|
abort "Signature ${pkgfile}.sig was not found"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
archrelease $repo-${_arch} || abort
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ -n $commit_arch ]]; then
|
||||||
|
archrelease "$repo-$commit_arch" || abort
|
||||||
|
else
|
||||||
|
archrelease "${arch[@]/#/$repo-}" || abort
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${#uploads[*]} -gt 0 ]]; then
|
||||||
|
echo 'uploading all package and signature files'
|
||||||
|
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || abort
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${arch[*]}" == 'any' ]; then
|
if [ "${arch[*]}" == 'any' ]; then
|
||||||
if [ -d ../repos/$repo-i686 -a -d ../repos/$repo-x86_64 ]; then
|
if [ -d ../repos/$repo-i686 -a -d ../repos/$repo-x86_64 ]; then
|
||||||
pushd ../repos/ >/dev/null
|
pushd ../repos/ >/dev/null
|
||||||
@@ -150,4 +195,13 @@ if [ "${arch[*]}" == 'any' ]; then
|
|||||||
echo 'done'
|
echo 'done'
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if [ -d ../repos/$repo-any ]; then
|
||||||
|
pushd ../repos/ >/dev/null
|
||||||
|
echo "removing $repo-any..."
|
||||||
|
svn rm $repo-any
|
||||||
|
svn commit -q -m "removed $repo-any for $pkgname"
|
||||||
|
echo 'done'
|
||||||
|
popd >/dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
10
communityco
10
communityco
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ "$1" = '' ]; then
|
|
||||||
echo 'Usage: communityco <package name> [<package name>]'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in "$@"; do
|
|
||||||
svn co svn+ssh://aur.archlinux.org/srv/svn-packages/$i
|
|
||||||
done
|
|
8
lddd
8
lddd
@@ -4,9 +4,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
ifs=$IFS
|
ifs=$IFS
|
||||||
IFS=':'
|
IFS="${IFS}:"
|
||||||
|
|
||||||
libdirs='/lib:/usr/lib:/opt/qt/lib:/opt/kde/lib:/usr/lib/libfakeroot:/opt/NX/lib'
|
libdirs="/lib /usr/lib /usr/local/lib $(cat /etc/ld.so.conf.d/*)"
|
||||||
extras=
|
extras=
|
||||||
|
|
||||||
TEMPDIR=$(mktemp -d /tmp/lddd-script.XXXX)
|
TEMPDIR=$(mktemp -d /tmp/lddd-script.XXXX)
|
||||||
@@ -25,9 +25,9 @@ for tree in $PATH $libdirs $extras; do
|
|||||||
-name '*.mcopclass' ! -name '*.mcoptype')
|
-name '*.mcopclass' ! -name '*.mcoptype')
|
||||||
IFS=$ifs
|
IFS=$ifs
|
||||||
for i in $files; do
|
for i in $files; do
|
||||||
if [ `file $i | grep -c 'ELF'` -ne 0 ]; then
|
if [ $(file $i | grep -c 'ELF') -ne 0 ]; then
|
||||||
# Is an ELF binary.
|
# Is an ELF binary.
|
||||||
if [ `ldd $i 2>/dev/null | grep -c 'not found'` -ne 0 ]; then
|
if [ $(ldd $i 2>/dev/null | grep -c 'not found') -ne 0 ]; then
|
||||||
# Missing lib.
|
# Missing lib.
|
||||||
echo "$i:" >> $TEMPDIR/raw.txt
|
echo "$i:" >> $TEMPDIR/raw.txt
|
||||||
ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
|
ldd $i 2>/dev/null | grep 'not found' >> $TEMPDIR/raw.txt
|
||||||
|
@@ -74,8 +74,12 @@ done
|
|||||||
# Canonicalize chrootdir, getting rid of trailing /
|
# Canonicalize chrootdir, getting rid of trailing /
|
||||||
chrootdir=$(readlink -e "$chrootdir")
|
chrootdir=$(readlink -e "$chrootdir")
|
||||||
|
|
||||||
[[ -z $copy ]] && copy=$default_copy
|
if [[ ${copy:0:1} = "/" ]]; then
|
||||||
copydir="$chrootdir/$copy"
|
copydir=$copy
|
||||||
|
else
|
||||||
|
[[ -z $copy ]] && copy=$default_copy
|
||||||
|
copydir="$chrootdir/$copy"
|
||||||
|
fi
|
||||||
|
|
||||||
# Pass all arguments after -- right to makepkg
|
# Pass all arguments after -- right to makepkg
|
||||||
MAKEPKG_ARGS="$MAKEPKG_ARGS ${*:$OPTIND}"
|
MAKEPKG_ARGS="$MAKEPKG_ARGS ${*:$OPTIND}"
|
||||||
@@ -153,10 +157,10 @@ fi
|
|||||||
if [ -n "$install_pkg" ]; then
|
if [ -n "$install_pkg" ]; then
|
||||||
pkgname="$(basename "$install_pkg")"
|
pkgname="$(basename "$install_pkg")"
|
||||||
cp "$install_pkg" "$copydir/$pkgname"
|
cp "$install_pkg" "$copydir/$pkgname"
|
||||||
mkarchroot -r "pacman -U /$pkgname" "$copydir"
|
mkarchroot -r "pacman -U /$pkgname --noconfirm" "$copydir"
|
||||||
ret=$?
|
ret=$?
|
||||||
rm "$copydir/$pkgname"
|
rm "$copydir/$pkgname"
|
||||||
#exit early, we've done all we need to
|
# Exit early, we've done all we need to
|
||||||
exit $ret
|
exit $ret
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -167,11 +171,11 @@ fi
|
|||||||
[ -d "$copydir/build" ] || mkdir "$copydir/build"
|
[ -d "$copydir/build" ] || mkdir "$copydir/build"
|
||||||
|
|
||||||
if [ "$REPACK" != "1" ]; then
|
if [ "$REPACK" != "1" ]; then
|
||||||
#Remove anything in there UNLESS -R (repack) was passed to makepkg
|
# Remove anything in there UNLESS -R (repack) was passed to makepkg
|
||||||
rm -rf "$copydir/build/"*
|
rm -rf "$copydir/build/"*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# read .makpekg.conf even if called via sudo
|
# Read .makepkg.conf even if called via sudo
|
||||||
if [ -n "${SUDO_USER}" ]; then
|
if [ -n "${SUDO_USER}" ]; then
|
||||||
makepkg_conf="/$(eval echo ~${SUDO_USER})/.makepkg.conf"
|
makepkg_conf="/$(eval echo ~${SUDO_USER})/.makepkg.conf"
|
||||||
else
|
else
|
||||||
@@ -277,7 +281,7 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for l in "${copydir}"/build/{namcap,*-{build,package,package_*}}.log; do
|
for l in "${copydir}"/build/{namcap,*-{build,check,package,package_*}}.log; do
|
||||||
[ -f "$l" ] && mv "$l" "${WORKDIR}"
|
[ -f "$l" ] && mv "$l" "${WORKDIR}"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
@@ -29,9 +29,9 @@ CHOST="i686-pc-linux-gnu"
|
|||||||
#-- Exclusive: will only run on i686
|
#-- Exclusive: will only run on i686
|
||||||
# -march (or -mcpu) builds exclusively for an architecture
|
# -march (or -mcpu) builds exclusively for an architecture
|
||||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
# -mtune optimizes for an architecture, but builds for whole processor family
|
||||||
CFLAGS="-march=i686 -mtune=generic -O2 -pipe"
|
CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
|
||||||
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe"
|
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
|
||||||
LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
|
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
|
|
||||||
|
@@ -29,9 +29,9 @@ CHOST="x86_64-unknown-linux-gnu"
|
|||||||
#-- Exclusive: will only run on x86_64
|
#-- Exclusive: will only run on x86_64
|
||||||
# -march (or -mcpu) builds exclusively for an architecture
|
# -march (or -mcpu) builds exclusively for an architecture
|
||||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
# -mtune optimizes for an architecture, but builds for whole processor family
|
||||||
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
|
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
|
||||||
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
|
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
|
||||||
LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
|
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@ if [ -z "$cache_dir" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /etc/pacman.d/mirrorlist ]; then
|
if [ -f /etc/pacman.d/mirrorlist ]; then
|
||||||
host_mirror=$(pacman -Sdp extra/devtools 2>/dev/null | sed -E 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
|
host_mirror=$(pacman -Sddp extra/devtools 2>/dev/null | sed -E 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
|
||||||
fi
|
fi
|
||||||
if [ -z "${host_mirror}" ]; then
|
if [ -z "${host_mirror}" ]; then
|
||||||
host_mirror='http://mirrors.kernel.org/archlinux/$repo/os/$arch'
|
host_mirror='http://mirrors.kernel.org/archlinux/$repo/os/$arch'
|
||||||
@@ -220,7 +220,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "${working_dir}/etc/locale.gen" ]; then
|
if [ -e "${working_dir}/etc/locale.gen" ]; then
|
||||||
echo -e 'en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8' > "${working_dir}/etc/locale.gen"
|
sed -i 's@^#\(en_US\|de_DE\)\(\.UTF-8\)@\1\2@' "${working_dir}/etc/locale.gen"
|
||||||
chroot "${working_dir}" locale-gen
|
chroot "${working_dir}" locale-gen
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
81
zsh_completion
Normal file
81
zsh_completion
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#compdef archbuild archco archrelease archrm commitpkg finddeps makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg community-testingpkg=commitpkg community-stagingpkg=commitpkg multilibpkg=commitpkg multilib-testingpkg=commitpkg extra-i686-build=archbuild extra-x86_64-build=archbuild testing-i686-build=archbuild testing-x86_64-build=archbuild staging-i686-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild communityco=archco
|
||||||
|
|
||||||
|
_arch=(i686 x86_64 any)
|
||||||
|
|
||||||
|
_tags=(
|
||||||
|
core-i686 core-x86_64 core-any
|
||||||
|
extra-i686 extra-x86_64 extra-any
|
||||||
|
multilib-i686 multilib-x86_64 multilib-any
|
||||||
|
staging-i686 staging-x86_64 staging-any
|
||||||
|
testing-i686 testing-x86_64 testing-any
|
||||||
|
multilib-testing-i686 multilib-testing-x86_64 multilib-testing-any
|
||||||
|
community-i686 community-x86_64 community-any
|
||||||
|
community-staging-i686 community-staging-x86_64 community-staging-any
|
||||||
|
community-testing-i686 community-testing-x86_64 community-testing-any
|
||||||
|
)
|
||||||
|
|
||||||
|
_archbuild_args=(
|
||||||
|
'-c[Recreate the chroot before building]'
|
||||||
|
'-r[Create chroots in this directory]:base_dir:_files -/'
|
||||||
|
)
|
||||||
|
|
||||||
|
_archco_args=(
|
||||||
|
'*:packages:_devtools_completions_all_packages'
|
||||||
|
)
|
||||||
|
|
||||||
|
_archrelease_args=(
|
||||||
|
"*:arch:($_tags[*])"
|
||||||
|
)
|
||||||
|
|
||||||
|
_archrm_args=(
|
||||||
|
'1:path:_files -/'
|
||||||
|
)
|
||||||
|
|
||||||
|
_commitpkg_args=(
|
||||||
|
"-a[Release to a specific architecture only]:arch:($_arch[*])"
|
||||||
|
'-l[Set bandwidth limit]:limit'
|
||||||
|
'1:commit_msg'
|
||||||
|
)
|
||||||
|
|
||||||
|
_finddeps_args=(
|
||||||
|
'1:packages:_devtools_completions_installed_packages'
|
||||||
|
)
|
||||||
|
|
||||||
|
_makechrootpkg_args=(
|
||||||
|
'-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"'
|
||||||
|
'-c[Clean the chroot before building]'
|
||||||
|
'-d[Add the package to a local db at /repo after building]'
|
||||||
|
'-h[Display usage]'
|
||||||
|
'-l[The directory to use as the working copy]:copy_dir:_files -/'
|
||||||
|
'-r[The chroot dir to use]:chroot_dir:_files -/'
|
||||||
|
'-u[Update the working copy of the chroot before building]'
|
||||||
|
)
|
||||||
|
|
||||||
|
_mkarchroot_args=(
|
||||||
|
'-r[Run a program within the context of the chroot]:app'
|
||||||
|
'-u[Update the chroot via pacman]'
|
||||||
|
'-f[Force overwrite of files in the working-dir]'
|
||||||
|
'-C[Location of a pacman config file]:pacman_config:_files'
|
||||||
|
'-M[Location of a makepkg config file]:makepkg_config:_files'
|
||||||
|
'-n[Do not copy config files into the chroot]'
|
||||||
|
'-c[Set pacman cache]:pacman_cache:_files -/'
|
||||||
|
'-h[Display usage]'
|
||||||
|
)
|
||||||
|
|
||||||
|
_rebuildpkgs_args=(
|
||||||
|
'1:chroot_dir:_files -/'
|
||||||
|
'*:packages:_devtools_completions_installed_packages'
|
||||||
|
)
|
||||||
|
|
||||||
|
_devtools_completions_all_packages() {
|
||||||
|
typeset -U packages
|
||||||
|
packages=($(_call_program packages pacman -Sql))
|
||||||
|
compadd - "${(@)packages}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_devtools() {
|
||||||
|
local argname="_${service}_args[@]"
|
||||||
|
_arguments -s "${(P)argname}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_devtools
|
Reference in New Issue
Block a user