fixes in finding functions, also test-make-ci added $PATH

This commit is contained in:
sobolevn 2016-07-02 12:59:55 +03:00
parent 6ea5fabf53
commit fab0b9b1f0
No known key found for this signature in database
GPG Key ID: FF672D568AE3C73E
3 changed files with 10 additions and 5 deletions

View File

@ -134,4 +134,5 @@ deploy-rpm: build-rpm
test-make-ci: clean install-test
@chmod +x "./utils/make/make-ci.sh"; sync; \
export SECRET_PROJECT_ROOT="${PWD}"; \
export PATH="${PWD}/vendor/bats/bin:${PATH}"; \
"./utils/make/make-ci.sh"

View File

@ -23,12 +23,12 @@ SCRIPT_DEST_DIR="${SCRIPT_BUILD_DIR}/buildroot"
function locate_deb {
find . -maxdepth 1 -name "$SCRIPT_DEST_DIR/*.deb" | head -1
find "$SCRIPT_DEST_DIR" -maxdepth 1 -name "*.deb" | head -1
}
function locate_rpm {
find . -maxdepth 1 -name "$SCRIPT_DEST_DIR/*.rpm" | head -1
find "$SCRIPT_DEST_DIR" -maxdepth 1 -name "*.rpm" | head -1
}

View File

@ -10,9 +10,12 @@ function resolve_link {
}
function abs_dirname {
local cwd="$(pwd)"
local cwd
local path="$1"
cwd="$(pwd)"
while [ -n "$path" ]; do
cd "${path%/*}"
local name="${path##*/}"
@ -29,7 +32,7 @@ if [ -z "$PREFIX" ]; then
exit 1
fi
SCRIPT_ROOT="$(dirname $(abs_dirname "$0"))"
SCRIPT_ROOT="$(dirname "$(abs_dirname "$0")")"
mkdir -p "$PREFIX"/bin "$PREFIX"/share/man/man1 "$PREFIX"/share/man/man7
cp "$SCRIPT_ROOT"/git-secret "$PREFIX"/bin/git-secret
@ -37,7 +40,8 @@ cp "$SCRIPT_ROOT"/git-secret "$PREFIX"/bin/git-secret
# There was an issue with this line:
# cp -R "$SCRIPT_ROOT"/man/man1/* "$PREFIX"/share/man/man1
# see https://github.com/sobolevn/git-secret/issues/35 for reference.
find "$SCRIPT_ROOT"/man/man1 -name *.1 -print0 | xargs -0 -I {} cp -a {} "$PREFIX"/share/man/man1
find "$SCRIPT_ROOT"/man/man1 -name '*.1' -print0 | xargs -0 -I {} cp \
-a {} "$PREFIX"/share/man/man1
cp "$SCRIPT_ROOT"/man/man7/git-secret.7 "$PREFIX"/share/man/man7/git-secret.7
echo "Installed git-secret to ${PREFIX}/bin/git-secret"