7 # loop because macos has no recursive resolution
8 while test -L "$cmdpath"; do
9 link="$(readlink "$cmdpath")"
10 cd "$(dirname "$cmdpath")"
13 script_home="$(cd "$(dirname "$cmdpath")" && pwd -P)"
16 # Force python to use ISO-8859-1 (aka Latin 1), a single-byte
17 # encoding, to help avoid any manipulation of data from system APIs
18 # (paths, users, groups, command line arguments, etc.)
20 # Preserve for selective use
21 if [ "${LC_CTYPE+x}" ]; then export BUP_LC_CTYPE="$LC_CTYPE"; fi
22 if [ "${LC_ALL+x}" ]; then
23 export BUP_LC_ALL="$LC_ALL"
24 export LC_COLLATE="$LC_ALL"
25 export LC_MONETARY="$LC_ALL"
26 export LC_NUMERIC="$LC_ALL"
27 export LC_TIME="$LC_ALL"
28 export LC_MESSAGES="$LC_ALL"
32 export PYTHONCOERCECLOCALE=0 # Perhaps not necessary, but shouldn't hurt
33 export LC_CTYPE=ISO-8859-1
35 bup_libdir="$script_home/../lib" # bup_libdir will be adjusted during install
37 export PYTHONPATH="$bup_libdir${PYTHONPATH:+:$PYTHONPATH}"
39 exec @bup_python@ "$@"