Skip to content

Commit b89a9fc

Browse files
committed
Merge #2966: Make install-params script work when called from other dirs
ab339ae Make install-params script work when called from other dirs (Duddino) Pull request description: Adjusts the installl-params.sh script to be able to function from outside the direct path. ACKs for top commit: ab339ae Fuzzbawls: utACK ab339ae Liquid369: ACK ab339ae Tree-SHA512: e054e54b44d62f985c21cdf980e1241a8ee8ddb676a1b5ae622abe2e05239e6e1b8b882990867c2bbd650b047a37657c35f9a0811dfcb5bef1ad29e70b67b107
2 parents 0770db5 + ab339ae commit b89a9fc

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

params/install-params.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fi
2121

2222
SAPLING_SPEND_NAME='sapling-spend.params'
2323
SAPLING_OUTPUT_NAME='sapling-output.params'
24+
SAPLING_PATH=$(cd "$(dirname "$0")" && pwd)
2425

2526
SHA256CMD="$(command -v sha256sum || echo shasum)"
2627
SHA256ARGS="$(command -v sha256sum >/dev/null || echo '-a 256')"
@@ -126,17 +127,11 @@ EOF
126127
if [ -d ".git" ] || [ -f autogen.sh ]
127128
then
128129
echo "Installing from source repo or dist tarball"
129-
pushd params
130130
fi
131131

132132
# Sapling parameters:
133-
install_params "$SAPLING_SPEND_NAME" "$PARAMS_DIR/$SAPLING_SPEND_NAME" "8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b75677efc13"
134-
install_params "$SAPLING_OUTPUT_NAME" "$PARAMS_DIR/$SAPLING_OUTPUT_NAME" "2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4"
135-
136-
if [ -d ".git" ] || [ -f autogen.sh ]
137-
then
138-
popd
139-
fi
133+
install_params "$SAPLING_PATH/$SAPLING_SPEND_NAME" "$PARAMS_DIR/$SAPLING_SPEND_NAME" "8e48ffd23abb3a5fd9c5589204f32d9c31285a04b78096ba40a79b75677efc13"
134+
install_params "$SAPLING_PATH/$SAPLING_OUTPUT_NAME" "$PARAMS_DIR/$SAPLING_OUTPUT_NAME" "2f0ebbcbb9bb0bcffe95a397e7eba89c29eb4dde6191c339db88570e3f3fb0e4"
140135
}
141136

142137
main

0 commit comments

Comments
 (0)