瀏覽代碼

Merge pull request #13065 from tianon/fix-build-deb-tilde-expansion

Fix '~' expansion in build-deb... (properly this time)
Jessie Frazelle 10 年之前
父節點
當前提交
b6448f25f2
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      hack/make/build-deb

+ 2 - 1
hack/make/build-deb

@@ -9,7 +9,8 @@ DEST=$1
 
 
 	# TODO consider using frozen images for the dockercore/builder-deb tags
 	# TODO consider using frozen images for the dockercore/builder-deb tags
 
 
-	debVersion="${VERSION//-/~}"
+	tilde='~' # ouch Bash 4.2 vs 4.3, you keel me
+	debVersion="${VERSION//-/$tilde}" # using \~ or '~' here works in 4.3, but not 4.2; just ~ causes $HOME to be inserted, hence the $tilde
 	# if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better
 	# if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better
 	if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then
 	if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then
 		gitUnix="$(git log -1 --pretty='%at')"
 		gitUnix="$(git log -1 --pretty='%at')"