diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-04-09 17:57:41 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-04-09 17:57:41 -0400 |
commit | 90a6bbda5c181569a969edb0d191d19b6110755b (patch) | |
tree | 7ae3e5e7d0fdd0f2e6e524016b799d39c0abc637 /tools/make-tarball | |
parent | 19b11d7e269360880d11d883a59b80b2909cee0f (diff) | |
download | vyos-cloud-init-90a6bbda5c181569a969edb0d191d19b6110755b.tar.gz vyos-cloud-init-90a6bbda5c181569a969edb0d191d19b6110755b.zip |
tools: fix [some] shell quoting problems
There were problems with these tools if the path had a space. This should
make these tools safe. There are others that still have problems.
Diffstat (limited to 'tools/make-tarball')
-rwxr-xr-x | tools/make-tarball | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/make-tarball b/tools/make-tarball index 47979f5b..27f5f374 100755 --- a/tools/make-tarball +++ b/tools/make-tarball @@ -18,18 +18,16 @@ if ! find_root; then exit 1; fi +REVNO=$(bzr revno "$ROOT_DIR") + if [ ! -z "$1" ]; then ARCHIVE_FN="$1" else - REVNO=$(bzr revno $ROOT_DIR) - VERSION=$($ROOT_DIR/tools/read-version) + VERSION=$("$ROOT_DIR/tools/read-version") ARCHIVE_FN="$PWD/cloud-init-$VERSION~bzr$REVNO.tar.gz" fi -FILES=$(cd $ROOT_DIR && bzr ls --versioned --recursive) -echo "$FILES" | tar czf $ARCHIVE_FN \ - -C "$ROOT_DIR" \ - --transform "s,^,cloud-init-$VERSION~bzr$REVNO/," \ - --no-recursion --files-from - +bzr export --format=tgz --root="cloud-init-$VERSION~bzr$REVNO" \ + "--revision=${REVNO}" "${ARCHIVE_FN}" "$ROOT_DIR" echo "$ARCHIVE_FN" |