diff options
author | Christoph Mende <angelos@gentoo.org> | 2015-10-22 13:07:48 +0200 |
---|---|---|
committer | Christoph Mende <angelos@gentoo.org> | 2015-10-22 13:07:48 +0200 |
commit | 0a142e904dfad15121b64c90aafc67e7e9ee375a (patch) | |
tree | 84c5b4d9bf5503e5a8431d001f16ec152f3893a7 /scripts | |
parent | Replace CVS header with $ (diff) | |
download | angelos-0a142e904dfad15121b64c90aafc67e7e9ee375a.tar.gz angelos-0a142e904dfad15121b64c90aafc67e7e9ee375a.tar.bz2 angelos-0a142e904dfad15121b64c90aafc67e7e9ee375a.zip |
Update sync-xfce-overlay.sh
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/sync-xfce-overlay.sh | 11 |
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 |