snapcraft: fix bcc-wrapper, handle ' ' quoting correctly
This allows '' quoted parameters to be passed in the wrapper.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
diff --git a/snapcraft/bcc-wrapper b/snapcraft/bcc-wrapper
index bbe5ec7..a575f34 100755
--- a/snapcraft/bcc-wrapper
+++ b/snapcraft/bcc-wrapper
@@ -1,4 +1,5 @@
-#!/bin/sh -e
+#!/bin/bash
+set -e
# Snappy does not yet support CAP_SYS_ADMIN for unconfined snaps, thus sudo:
# https://bugs.launchpad.net/snappy/+bug/1586581
# stdout isn't set to line buffered mode:
@@ -7,7 +8,7 @@
cmd="$1"
if [ `id -u` = 0 ] ; then
shift
- stdbuf -oL $SNAP/usr/share/bcc/tools/$cmd $@
+ stdbuf -oL $SNAP/usr/share/bcc/tools/$cmd "$@"
else
echo "Need to run $cmd as root (use sudo $@)"
exit 1