[PATCH] scripts/showSamples.sh: fix list-samples

Bryan Hundven bryanhundven@gmail.com
Tue Jul 3 03:22:00 GMT 2012


# HG changeset patch
# User Bryan Hundven <bryanhundven@gmail.com>
# Date 1341284878 25200
# Node ID e489fc02a7ab0a7e04b922728bf898dee80d0ee4
# Parent  4c8fd10c18e94975239a69897f38d9eb046fad8c
scripts/showSamples.sh: fix list-samples

If $(pwd)/.config.sample doesn't exist, don't try to source it.
Also, don't forget to quote it, as the parent directories might have
spaces or other weird characters.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>

diff -r 4c8fd10c18e9 -r e489fc02a7ab scripts/showSamples.sh
--- a/scripts/showSamples.sh	Mon Jun 18 13:36:29 2012 +0200
+++ b/scripts/showSamples.sh	Mon Jul 02 20:07:58 2012 -0700
@@ -37,7 +37,7 @@
             fi
             ;;
     esac
-    . $(pwd)/.config.sample
+    [ -r "$(pwd)/.config.sample" ] && . "$(pwd)/.config.sample"
     if [ -z "${wiki}" ]; then
         t_width=14
         printf "%-*s  [%s" ${width} "${sample}" "${sample_type}"

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list