From 2c0da26daa81caf40461758bbab5ff494534def4 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 14 Mar 2018 01:04:09 +0100 Subject: travis: use local vars inside functions --- .travis/targets/static.sh | 8 ++++---- .travis/targets/win32.sh | 18 +++++++++--------- .travis/targets/win64.sh | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to '.travis/targets') diff --git a/.travis/targets/static.sh b/.travis/targets/static.sh index d0bb42f..d252860 100644 --- a/.travis/targets/static.sh +++ b/.travis/targets/static.sh @@ -11,7 +11,7 @@ build() { rm -rf root mkdir -p root - PV="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)" + local pv="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)" install -m 755 blogc root/blogc install -m 644 src/blogc-github-lambda/lambda_function.py root/lambda_function.py @@ -19,11 +19,11 @@ build() { strip root/blogc pushd root > /dev/null - zip "../blogc-github-lambda-${PV}.zip" * + zip "../blogc-github-lambda-${pv}.zip" * popd > /dev/null - install -m 755 root/blogc "blogc-static-amd64-${PV}" - xz -z "blogc-static-amd64-${PV}" + install -m 755 root/blogc "blogc-static-amd64-${pv}" + xz -z "blogc-static-amd64-${pv}" } deploy() { diff --git a/.travis/targets/win32.sh b/.travis/targets/win32.sh index ec3ed03..1a6745f 100644 --- a/.travis/targets/win32.sh +++ b/.travis/targets/win32.sh @@ -10,18 +10,18 @@ build() { --disable-runserver make blogc.exe - PN="$(grep PACKAGE_TARNAME config.h | cut -d\" -f2)" - PV="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)" - DEST_DIR="${PN}-${PV}-${TARGET}" + local pn="$(grep PACKAGE_TARNAME config.h | cut -d\" -f2)" + local pv="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)" + local dest_dir="${pn}-${pv}-${TARGET}" - rm -rf "${DEST_DIR}" - mkdir -p "${DEST_DIR}" + rm -rf "${dest_dir}" + mkdir -p "${dest_dir}" - cp .libs/blogc.exe "${DEST_DIR}/" - cp ../LICENSE "${DEST_DIR}/" - cp ../README.md "${DEST_DIR}/" + cp .libs/blogc.exe "${dest_dir}/" + cp ../LICENSE "${dest_dir}/" + cp ../README.md "${dest_dir}/" - zip "${DEST_DIR}.zip" "${DEST_DIR}"/* + zip "${dest_dir}.zip" "${dest_dir}"/* } deploy() { diff --git a/.travis/targets/win64.sh b/.travis/targets/win64.sh index e6c4199..c9fed2c 100644 --- a/.travis/targets/win64.sh +++ b/.travis/targets/win64.sh @@ -10,18 +10,18 @@ build() { --disable-runserver make blogc.exe - PN="$(grep PACKAGE_TARNAME config.h | cut -d\" -f2)" - PV="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)" - DEST_DIR="${PN}-${PV}-${TARGET}" + local pn="$(grep PACKAGE_TARNAME config.h | cut -d\" -f2)" + local pv="$(grep PACKAGE_VERSION config.h | cut -d\" -f2)" + local dest_dir="${pn}-${pv}-${TARGET}" - rm -rf "${DEST_DIR}" - mkdir -p "${DEST_DIR}" + rm -rf "${dest_dir}" + mkdir -p "${dest_dir}" - cp .libs/blogc.exe "${DEST_DIR}/" - cp ../LICENSE "${DEST_DIR}/" - cp ../README.md "${DEST_DIR}/" + cp .libs/blogc.exe "${dest_dir}/" + cp ../LICENSE "${dest_dir}/" + cp ../README.md "${dest_dir}/" - zip "${DEST_DIR}.zip" "${DEST_DIR}"/* + zip "${dest_dir}.zip" "${dest_dir}"/* } deploy() { -- cgit v1.2.3-18-g5258