summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2015-10-22 13:07:48 +0200
committerChristoph Mende <angelos@gentoo.org>2015-10-22 13:07:48 +0200
commit0a142e904dfad15121b64c90aafc67e7e9ee375a (patch)
tree84c5b4d9bf5503e5a8431d001f16ec152f3893a7 /scripts
parentReplace CVS header with $ (diff)
downloadangelos-0a142e904dfad15121b64c90aafc67e7e9ee375a.tar.gz
angelos-0a142e904dfad15121b64c90aafc67e7e9ee375a.tar.bz2
angelos-0a142e904dfad15121b64c90aafc67e7e9ee375a.zip
Update sync-xfce-overlay.sh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sync-xfce-overlay.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/sync-xfce-overlay.sh b/scripts/sync-xfce-overlay.sh
index 968e51e..f83fa7d 100755
--- a/scripts/sync-xfce-overlay.sh
+++ b/scripts/sync-xfce-overlay.sh
@@ -1,10 +1,10 @@
#!/bin/bash
repo_name="xfce-dev"
-[ $# -gt 0 ] && repo_name=$1
+[[ $# -gt 0 ]] && repo_name=$1
OVERLAY="$(portageq get_repo_path / ${repo_name})"
-[ $? -eq 0 ] || exit 1
-PORTDIR="$(portageq portdir)"
+[[ $? -eq 0 ]] || exit 1
+PORTDIR="$(portageq get_repo_path / gentoo)"
# collect ebuilds
pushd "${OVERLAY}" >/dev/null
@@ -27,9 +27,10 @@ for i in ${pkgs}; do
# get destination ebuild's header
dst=${OVERLAY}/${i}
+ [[ -e ${dst} ]] || continue
dstheader=$(grep "^# \$Header: " ${dst})
- if [ "${srcheader}" != "${dstheader}" ]; then
+ if [[ "${srcheader}" != "${dstheader}" ]]; then
# copy new ebuild
cp -f ${src} ${dst}
@@ -43,7 +44,7 @@ for i in ${pkgs}; do
fi
done
-if [ ${changes} -gt 0 ]; then
+if [[ ${changes} -gt 0 ]]; then
echo ${changes} ebuilds synced, please review the changes
else
echo Everything up to date