Commit f0d65db0 authored by Seblu's avatar Seblu
Browse files

Fork from archutils. Massive removal.

This repository will only handle script related to manage my repositories.
parent 67180b8f
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
# Maintainer: Sébastien Luttringer

pkgname=archutils-git
pkgname=archrepo-git
pkgver=1
pkgrel=1
pkgdesc='Seblu Archlinux Utils'
pkgdesc='Seblu Archlinux Repositories Stuff'
arch=('any')
url='https://github.com/seblu/archutils'
license=('GPL2')
depends=('python' 'bash' 'devtools')
depends=('bash' 'devtools')

#pkgver() {
#  git log -1 --pretty=format:%h
@@ -21,9 +21,8 @@ package() {
  # install config
  install -m644 pacman-seblu.conf "$pkgdir/usr/share/devtools"
  # install binaries
  install -m755 atc seblu-build seblu-repo-add aurdown seblu-build-commit \
    seblu-update go2chroot seblu-commit	addpkg sign archbuild-dl pkgbuild2json \
    seblu-remove tmpmakepkg seblu-cleanup seblu-list "$pkgdir/usr/bin"
  install -m755 seblu-build seblu-repo-add seblu-build-commit seblu-update \
    seblu-commit seblu-remove seblu-cleanup seblu-list "$pkgdir/usr/bin"
  # symlink archbuild
  ln -s archbuild $pkgdir/usr/bin/seblu-i686-build
  ln -s archbuild $pkgdir/usr/bin/seblu-x86_64-build

addpkg

deleted100755 → 0
+0 −26
Original line number Diff line number Diff line
#!/bin/bash

# Copyright © Sébastien Luttringer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(( $# != 1 )) && echo "usage: ${0##*/} name" && exit 1

mkdir -p "$1"/{repos,trunk}
touch "$1"/trunk/PKGBUILD
svn add "$1"
svn propset svn:keywords 'Id' "$1/trunk/PKGBUILD"

# vim:set ts=2 sw=2 ft=sh noet:

archbuild-dl

deleted100755 → 0
+0 −75
Original line number Diff line number Diff line
#!/bin/bash

# Copyright © Sébastien Luttringer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

pkg_host='root@whooper.v.seblu.net'
pkg_base='/root/packages'
pkg_regex=''
arch_regexp="($(uname -m)|any)"

usage() {
	echo "usage: ${0##*/} <list|get|install> [pkg_regex] [arch_regexp] [pkg_base] [pkg_host]" >&2
	echo 'default:'
	echo "   pkg_host: $pkg_host"
	echo "   pkg_regex: $pkg_regex"
	echo "   pkg_base: $pkg_base"
	echo "   arch_regex: $arch_regexp"
	exit 1
}

(( $# >= 1 )) || usage

case $1 in
	list|get|install) action="$1";;
	*) usage;;
esac

[[ -n "$2" ]] && pkg_regex=$2
[[ -n "$3" ]] && arch_regexp=$3
[[ -n "$4" ]] && pkg_base=$4
[[ -n "$5" ]] && pkg_host=$5

list_tmp=$(mktemp)
ssh "$pkg_host" \
"find '$pkg_base' -type f \
-regextype posix-egrep -regex '.*/$pkg_regex.*-$arch_regexp.pkg\.tar\.xz'" \
</dev/null >"$list_tmp" 2>/dev/null
exec 3<>"$list_tmp"

while read -u 3 -r line; do
	[[ $line ]] || continue
	case $action in
	list)
		echo "$line"
		;;
	get)
		[[ -f $(basename $line) ]] &&
			echo "==> $(basename $line): already exists. skipped!" && continue
		scp "$pkg_host:$line" .
		;;
	install)
		(( EUID == 0 )) && pacman='pacman' || pacman='sudo pacman'
		pkg_tmp=$(mktemp)
		scp "$pkg_host:$line" "$pkg_tmp" && $pacman -U "$pkg_tmp"
		rm -f "$pkg_tmp"
		;;
	esac
done

rm -f "$list_tmp"

# vim:set ts=2 sw=2 ft=sh noet:

atc

deleted100755 → 0
+0 −31
Original line number Diff line number Diff line
#!/bin/bash

# Copyright © Sébastien Luttringer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

find ${1:-.} \( -name '*.pkg.tar.xz' \
       -o -name '*.pkg.tar.xz.sig' \
       -o -name '*.src.tar.gz' \
       -o -name '*.log' \
       -o -name 'svn-commit.tmp' \
       \) -delete -print

find ${1:-.} -type d -a '(' -name 'src' -o -name 'pkg' ')' | while read -r d; do
	base=$(dirname "$d")
	[[ -r "$base/PKGBUILD" ]] && echo "$d" && 'rm' -r "$d"
done

# vim:set ts=2 sw=2 ft=sh et:

aurdown

deleted100755 → 0
+0 −28
Original line number Diff line number Diff line
#!/bin/bash

# Copyright © Sébastien Luttringer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(( $# < 1 )) && echo "usage: ${0##*/} <pkgsource> [pkgsource]..." >&2

for pkg; do
  [[ -e "$pkg.tar.gz" ]] && echo "$pkg.tar.gz already exists. skipped!" >&2 && continue
	wget "http://aur.archlinux.org/packages/${pkg:0:2}/$pkg/$pkg.tar.gz" || continue
  tar -xvv --no-same-owner --no-same-permissions -f "$pkg.tar.gz"
  (( $UID == 0 )) && chown -R nobody:nobody "$pkg"
done

# vim:set ts=2 sw=2 ft=sh et:
Loading