diff options
author | Mihai Moldovan <ionic@ionic.de> | 2015-07-17 17:48:44 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2015-07-17 17:48:44 +0200 |
commit | 0606ec8149a087ebe5681012670f265c2f7e9adb (patch) | |
tree | 5f7644e77104b17d155a0299dff52fbb5a28d08c /debian | |
parent | 01ad7dad439f446c559e6da8411962c26d99e16a (diff) | |
download | nx-libs-0606ec8149a087ebe5681012670f265c2f7e9adb.tar.gz nx-libs-0606ec8149a087ebe5681012670f265c2f7e9adb.tar.bz2 nx-libs-0606ec8149a087ebe5681012670f265c2f7e9adb.zip |
debian/roll-tarballs.sh: more quotes, more curly braces, replace cd with pushd and pop.
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/roll-tarballs.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh index 0f9568aad..52c2090f0 100755 --- a/debian/roll-tarballs.sh +++ b/debian/roll-tarballs.sh @@ -52,7 +52,7 @@ else fi if [ x"$RELEASE" == "xHEAD" ]; then - CHECKOUT=refs/heads/$(git rev-parse --abbrev-ref HEAD) + CHECKOUT="refs/heads/$(git rev-parse --abbrev-ref HEAD)" fi if ! git rev-parse --verify -q "$CHECKOUT" >/dev/null; then @@ -80,14 +80,14 @@ cd "${TEMP_DIR}/${PROJECT}-${RELEASE}/" # Replace symlinks by copies of the linked target files # Note: We don't have symlinked directories!!! -find . -type l | while read link; do - TARGET=$(readlink "$link") - cd $(dirname "$link") - if [ -f "$TARGET" ]; then - rm -f $(basename "$link") - cp "${TARGET}" $(basename "$link") +find . -type "l" | while read link; do + TARGET="$(readlink "${link}")" + pushd "$(dirname "${link}")" >/dev/null + if [ -f "${TARGET}" ]; then + rm -f "$(basename "${link}")" + cp "${TARGET}" "$(basename "${link}")" fi - cd - 1>/dev/null + popd >/dev/null done mkdir -p "doc/applied-patches" |