Skip to content

Commit 9f9f6de

Browse files
committed
Administrivia
Don't use finish in sourced admin programs
1 parent f94100d commit 9f9f6de

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

admin-tools/pyenv-newest-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ if [[ $0 == ${BASH_SOURCE[0]} ]] ; then
55
echo "This script should be *sourced* rather than run directly through bash"
66
exit 1
77
fi
8-
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'
8+
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'

admin-tools/setup-master.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ function checkout_version {
1818
return $?
1919
}
2020

21-
# FIXME put some of the below in a common routine
22-
function finish {
23-
cd $owd
24-
}
2521
owd=$(pwd)
26-
trap finish EXIT
2722

2823
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
2924

@@ -35,4 +30,4 @@ cd $fulldir/..
3530

3631
git pull
3732
rm -v */.python-version || true
38-
finish
33+
cd $owd

admin-tools/setup-python-2.4.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ function checkout_version {
1919
return $?
2020
}
2121

22-
function finish {
23-
cd $owd
24-
}
2522
owd=$(pwd)
26-
trap finish EXIT
2723

2824
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
2925

@@ -34,4 +30,4 @@ fulldir=$(readlink -f $mydir)
3430

3531
git pull
3632
rm -v */.python-version || true
37-
finish
33+
cd $owd

admin-tools/setup-python-3.0.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ function checkout_version {
2020
return $?
2121
}
2222

23-
function finish {
24-
cd $owd
25-
}
2623
owd=$(pwd)
2724
trap finish EXIT
2825

@@ -36,4 +33,4 @@ cd $fulldir/..
3633

3734
git pull
3835
rm -v */.python-version || true
39-
finish
36+
cd $owd

admin-tools/setup-python-3.3.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ function checkout_version {
1919
return $?
2020
}
2121

22-
function finish {
23-
cd $owd
24-
}
2522
owd=$(pwd)
26-
trap finish EXIT
2723

2824
export PATH=$HOME/.pyenv/bin/pyenv:$PATH
2925

@@ -36,4 +32,4 @@ rm -v */.python-version || true
3632

3733
git pull
3834
rm -v */.python-version || true
39-
finish
35+
cd $owd

0 commit comments

Comments
 (0)