summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-08-10 15:17:59 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-08-13 20:18:11 +0200
commit25aae4ecfea68b6ef3f5cd6d3c0c298df66bd14b (patch)
treef1c5a3aabbdd896e7bd11945b7ece152811f2595
parentc8ba49c6a14caff130bd64c594639bff67015b25 (diff)
downloaddevtools-25aae4ecfea68b6ef3f5cd6d3c0c298df66bd14b.tar.xz
commitpkg: Avoid unnecessary use of grep(1)
Use bash patterns instead of using grep(1) to check if a source file contains the string "://". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
-rwxr-xr-xcommitpkg6
1 files changed, 3 insertions, 3 deletions
diff --git a/commitpkg b/commitpkg
index 999c35f..07c28d4 100755
--- a/commitpkg
+++ b/commitpkg
@@ -79,9 +79,9 @@ esac
# check if all local source files are under version control
for s in "${source[@]}"; do
- echo "$s" | grep -Fvq '://' && \
- svn status "$s" | grep -q '^\?' && \
- abort "$s is not under version control"
+ if [[ $s != *://* ]] && svn status "$s" | grep -q '^\?'; then
+ abort "$s is not under version control"
+ fi
done
# check if changelog and install files are under version control