Repair: fix sandbox initialization script
This commit is contained in:
parent
79f7cf3943
commit
b78d7bdaee
4
Makefile
4
Makefile
@ -56,6 +56,9 @@ install:
|
|||||||
@jbuilder build @install
|
@jbuilder build @install
|
||||||
@jbuilder install
|
@jbuilder install
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
@jbuilder uninstall
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@-jbuilder clean
|
@-jbuilder clean
|
||||||
@-rm -f \
|
@-rm -f \
|
||||||
@ -67,4 +70,3 @@ clean:
|
|||||||
@-make -C docs clean
|
@-make -C docs clean
|
||||||
|
|
||||||
.PHONY: all test build-deps docker-image clean
|
.PHONY: all test build-deps docker-image clean
|
||||||
|
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
client_dir="${client_dir:=$HOME/.tezos-client}"
|
if [ "$is_tezos_sandboxed_init" = "1" ]; then
|
||||||
client="${client:=tezos-client -base-dir $client_dir}"
|
echo 'The client has already been initialized in this session.' >&2
|
||||||
admin_client="${client:=tezos-admin-client -base-dir $client_dir}"
|
echo 'Start a new shell session if you wish to reinitialize a client.' >&2
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
client_dirs=()
|
client_dirs=()
|
||||||
|
|
||||||
@ -219,8 +221,9 @@ main () {
|
|||||||
local_client="${local_client:-$bin_dir/../../_build/default/src/bin_client/main_client.exe}"
|
local_client="${local_client:-$bin_dir/../../_build/default/src/bin_client/main_client.exe}"
|
||||||
local_admin_client="${local_admin_client:-$bin_dir/../../_build/default/src/bin_client/main_admin.exe}"
|
local_admin_client="${local_admin_client:-$bin_dir/../../_build/default/src/bin_client/main_admin.exe}"
|
||||||
else
|
else
|
||||||
local_client="${local_client:-tezos-client}"
|
# we assume a clean install with tezos-(admin-)client in the path
|
||||||
local_admin_client="${local_admin_client:-tezos-admin-client}"
|
local_client="${local_client:-$(which tezos-client)}"
|
||||||
|
local_admin_client="${local_admin_client:-$(which tezos-admin-client)}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then
|
if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then
|
||||||
@ -246,7 +249,9 @@ PATH="$client_dir/bin:\$PATH" ; export PATH ;
|
|||||||
alias tezos-activate-alpha="$client -block genesis activate protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK with fitness 1 and key dictator" ;
|
alias tezos-activate-alpha="$client -block genesis activate protocol ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK with fitness 1 and key dictator" ;
|
||||||
alias tezos-client-reset="rm -rf \"$client_dir\"; unalias tezos-activate-alpha tezos-client-reset" ;
|
alias tezos-client-reset="rm -rf \"$client_dir\"; unalias tezos-activate-alpha tezos-client-reset" ;
|
||||||
alias tezos-autocomplete="if [ \$ZSH_NAME ] ; then autoload bashcompinit ; bashcompinit ; fi ; source \"$bin_dir/bash-completion.sh\"" ;
|
alias tezos-autocomplete="if [ \$ZSH_NAME ] ; then autoload bashcompinit ; bashcompinit ; fi ; source \"$bin_dir/bash-completion.sh\"" ;
|
||||||
|
is_tezos_sandboxed_init=1 ; export is_tezos_sandboxed_init;
|
||||||
trap tezos-client-reset EXIT ;
|
trap tezos-client-reset EXIT ;
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
(cat | sed -e 's/^/## /') 1>&2 <<EOF
|
(cat | sed -e 's/^/## /') 1>&2 <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user