summaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2009-01-08 20:48:47 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2009-01-08 20:48:47 +0100
commit0ca3f6991a7c8352423a1b2673d91941917cfcb2 (patch)
treee2e1f4d5ae01801fde3f6e3197a529a0108ab4de /bashrc
parent1e57b0b6831f84fe435695816fd9f870750e2498 (diff)
downloadportage-ext-0ca3f6991a7c8352423a1b2673d91941917cfcb2.tar.gz
portage-ext-0ca3f6991a7c8352423a1b2673d91941917cfcb2.tar.xz
portage-ext-0ca3f6991a7c8352423a1b2673d91941917cfcb2.zip
reworked scripts
sync of overlays is now possible sync gives output prepended with the overlay name to enable sync set $SYNC in the overlay configuration to the command that should be executed in the directory of the overlay to sync it
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc56
1 files changed, 10 insertions, 46 deletions
diff --git a/bashrc b/bashrc
index 4389b83..d523183 100644
--- a/bashrc
+++ b/bashrc
@@ -1,45 +1,6 @@
#!/bin/bash
-# error
-eecho() {
- case "x${NOCOLOR}" in
- x[y,Y][e,E][s,S]|x-[t,T][r,R][u,U][e,E]|x)
- echo -ne '\e[1;31m * \e[0m';;
- x*)
- echo -n " * ";;
- esac
-
- echo "$*"
-}
-
-# warning
-wecho() {
- case "x${NOCOLOR}" in
- x[y,Y][e,E][s,S]|x-[t,T][r,R][u,U][e,E]|x)
- echo -ne '\e[1;33m * \e[0m';;
- x*)
- echo -n " * ";;
- esac
-
- echo "$*"
-}
-
-# positiv echo
-pecho() {
- case "x${NOCOLOR}" in
- x[y,Y][e,E][s,S]|x-[t,T][r,R][u,U][e,E]|x)
- echo -ne '\e[1;32m * \e[0m';;
- x*)
- echo -n " * ";;
- esac
-
- echo "$*"
-}
-
-# info
-iecho() {
- echo ">>> $*"
-}
+. /etc/init.d/functions.sh
autopatch() {
local diff level p patches patched
@@ -50,7 +11,7 @@ autopatch() {
[[ $patches == "" ]] && return 0
if ! cd ${S}; then
- eecho "FAILED TO cd $S"
+ eerror "FAILED TO cd $S"
return 1
fi
@@ -69,24 +30,27 @@ autopatch() {
fi
fi
done
- [[ $patched != 1 ]] && eecho "FAILED auto patching $p"
+ [[ $patched != 1 ]] && eerror "FAILED auto patching $p"
else
- [[ ! -e $diff ]] && eecho "$diff does not exist, unable to auto patch"
+ [[ ! -e $diff ]] && eerror "$diff does not exist, unable to auto patch"
fi
done
cd $OLDPWD
}
-#wecho "at $EBUILD_PHASE"
+#ewarn "at $EBUILD_PHASE"
case $EBUILD_PHASE in
compile)
+ ebegin "Checking for auto patches in ${PATCH_OVERLAY}/${CATEGORY}/${PN} ..."
+
if [[ ! -d "$PATCH_OVERLAY" ]]; then
- eecho "PATCH_OVERLAY=$PATCH_OVERLAY is not a dir"
+ eend 1
+ eerror "PATCH_OVERLAY=$PATCH_OVERLAY is not a dir"
else
- iecho "Checking for auto patches in ${PATCH_OVERLAY}/${CATEGORY}/${PN} ..."
PATH=$PATH:/usr/sbin:/usr/bin:/bin:/sbin
autopatch
+ eend 0
fi
;;
esac