[137627] users/chunyang/svn-ls-files/svn-ls-files
chunyang at macports.org
chunyang at macports.org
Mon Jun 15 08:58:22 PDT 2015
Revision: 137627
https://trac.macports.org/changeset/137627
Author: chunyang at macports.org
Date: 2015-06-15 08:58:22 -0700 (Mon, 15 Jun 2015)
Log Message:
-----------
users/chunyang: svn-ls-files: Exit if wrong usage and fix awk expr
Modified Paths:
--------------
users/chunyang/svn-ls-files/svn-ls-files
Modified: users/chunyang/svn-ls-files/svn-ls-files
===================================================================
--- users/chunyang/svn-ls-files/svn-ls-files 2015-06-15 15:53:07 UTC (rev 137626)
+++ users/chunyang/svn-ls-files/svn-ls-files 2015-06-15 15:58:22 UTC (rev 137627)
@@ -12,15 +12,15 @@
echo "Usage - $0 [PATH]"
}
-if [ $# -ne 0 ]
-then
- cd "$1" &> /dev/null || usage
+if [ $# -ne 0 ]; then
+ if cd "$1" &> /dev/null; then
+ ;
+ else
+ usage
+ exit 1
+ fi
fi
-for f in $( svn status --quiet --verbose | awk '{ print $4 }' )
-do
- if [ -f "$f" ]
- then
- echo "$f"
- fi
+for f in $( svn status --verbose --quiet | awk '{print $NF}' ); do
+ [[ -f $f ]] && echo "$f"
done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150615/14ef4606/attachment.html>
More information about the macports-changes
mailing list