Administrivia

Don't use finish in sourced admin programs
This commit is contained in:
rocky
2024-02-17 15:11:09 -05:00
parent f94100d24c
commit 9f9f6de983
5 changed files with 5 additions and 21 deletions

View File

@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
echo "This script should be *sourced* rather than run directly through bash"
exit 1
fi
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.16 pypy3.7-7.3.9 pypy3.8-7.3.10 pyston-2.3.5 3.8.17'
export PYVERSIONS='3.6.15 pypy3.6-7.3.1 3.7.16 pypy3.7-7.3.9 pypy3.8-7.3.10 pyston-2.3.5 3.8.18'

View File

@@ -18,12 +18,7 @@ function checkout_version {
return $?
}
# FIXME put some of the below in a common routine
function finish {
cd $owd
}
owd=$(pwd)
trap finish EXIT
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
@@ -35,4 +30,4 @@ cd $fulldir/..
git pull
rm -v */.python-version || true
finish
cd $owd

View File

@@ -19,11 +19,7 @@ function checkout_version {
return $?
}
function finish {
cd $owd
}
owd=$(pwd)
trap finish EXIT
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
@@ -34,4 +30,4 @@ fulldir=$(readlink -f $mydir)
git pull
rm -v */.python-version || true
finish
cd $owd

View File

@@ -20,9 +20,6 @@ function checkout_version {
return $?
}
function finish {
cd $owd
}
owd=$(pwd)
trap finish EXIT
@@ -36,4 +33,4 @@ cd $fulldir/..
git pull
rm -v */.python-version || true
finish
cd $owd

View File

@@ -19,11 +19,7 @@ function checkout_version {
return $?
}
function finish {
cd $owd
}
owd=$(pwd)
trap finish EXIT
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
@@ -36,4 +32,4 @@ rm -v */.python-version || true
git pull
rm -v */.python-version || true
finish
cd $owd