pld-ftp-admin: shell/bashrc - signpkg hacking moved to python code (pld-ftp...
glen
glen at pld-linux.org
Wed May 27 21:31:27 CEST 2009
Author: glen Date: Wed May 27 19:31:27 2009 GMT
Module: pld-ftp-admin Tag: HEAD
---- Log message:
- signpkg hacking moved to python code (pld-ftp-admin module)
---- Files affected:
pld-ftp-admin/shell:
bashrc (1.13 -> 1.14)
---- Diffs:
================================================================
Index: pld-ftp-admin/shell/bashrc
diff -u pld-ftp-admin/shell/bashrc:1.13 pld-ftp-admin/shell/bashrc:1.14
--- pld-ftp-admin/shell/bashrc:1.13 Wed May 27 00:39:38 2009
+++ pld-ftp-admin/shell/bashrc Wed May 27 21:31:22 2009
@@ -1,32 +1,14 @@
# .bashrc - file executed when executing bash
-# Put your local aliases here
+# ftp admin aliases
alias rmpkg=~/pld-ftp-admin/scripts/remove.py
alias gen-indexes=~/pld-ftp-admin/scripts/gen-indexes.py
alias dump-locks=~/pld-ftp-admin/scripts/dump-locks.py
+alias signpkg=~/pld-ftp-admin/scripts/sign.py
+alias mvpkg=~/pld-ftp-admin/scripts/move.py
+alias testmvpkg=~/pld-ftp-admin/scripts/test-move.py
-testmvpkg() {
- from="$1"
- to="$2"
- ~/pld-ftp-admin/scripts/test-move.py "$@" || return $?
- shift 2
- if [ "$to" = "PLD" -o "$to" = "updates" ]; then
- echo >&2 "Checking signatures"
- testsignpkg "$@" || return $?
- fi
-}
-
-mvpkg() {
- __wrap_signpkg() {
- shift 2
- testsignpkg "$@" || return $?
- }
- if [ "$2" = "PLD" -o "$2" = "updates" ]; then
- __wrap_signpkg "$@" || return $?
- fi
- ~/pld-ftp-admin/scripts/move.py "$@" || return $?
-}
-
+# usual aliases to make your terminal usable
alias ls='ls --color=auto -BFN --show-control-chars'
alias l='ls -lh'
alias la='ls -la'
@@ -72,42 +54,8 @@
xargs -l512 -r touch
}
-signpkg() {
- local pkg=$1
- if [ ! -f $pkg ]; then
- echo >&2 "signpkg: Specify existing info file"
- return
- fi
- echo "$@" | xargs awk -F: '/^file:/{arch=$2; file=$3; printf("../../%s/RPMS/%s\n", arch, file)}' | \
- xargs -l1 -I '%{F}' rpm --nodigest --nosignature -qp --qf '%|SIGGPG?{}:{%{F}\n}|' '%{F}' | \
- xargs -r rpm --resign
-}
-
-testsignpkg() {
- local pkg=$1
- if [ ! -f $pkg ]; then
- echo >&2 "testsignpkg: Specify existing info file"
- return
- fi
- local out
- out=$(
- awk -F: '/^file:/{arch=$2; file=$3; printf("../../%s/RPMS/%s\n", arch, file)}' "$@" | \
- xargs -l512 \
- rpm -qp --qf '%{name}-%{version}-%{release}.%{arch} %{siggpg}\n' 2>/dev/null | \
- fgrep '(none)' | \
- sed -e 's,^,ERR: ,;s,(none),is not signed,'
- )
-
- if [ "$out" ]; then
- echo "$out"
- return 1
- else
- return 0
- fi
-}
-
unlocktree() {
- local tree="$1"
+ for tree in "$@"; do
(
cd ~/pld-ftp-admin/modules
python -c "
@@ -116,4 +64,5 @@
ftpio.unlock('$tree')
"
)
+ done
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-ftp-admin/shell/bashrc?r1=1.13&r2=1.14&f=u
More information about the pld-cvs-commit
mailing list