diff options
-rw-r--r-- | include/lib.sh | 17 | ||||
-rwxr-xr-x | script/trees | 8 |
2 files changed, 17 insertions, 8 deletions
diff --git a/include/lib.sh b/include/lib.sh index a9a292c2..894a2cac 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -107,10 +107,19 @@ if [ -z "${TMPDIR+x}" ]; then export TMPDIR="/tmp" export TMPDIR="$(mktemp -d -t xbmk_XXXXXXXX)" touch lock || $err "cannot create 'lock' file" - rm -Rf "$XBMK_CACHE/xbmkpath" || $err "cannot remove xbmkpath" - mkdir -p "$XBMK_CACHE/xbmkpath" || $err "cannot create xbmkpath" - export PATH="$XBMK_CACHE/xbmkpath:$PATH" || \ - $err "Can't create xbmkpath" + rm -Rf "$XBMK_CACHE/xbmkpath" "$XBMK_CACHE/gnupath" || \ + $err "cannot remove xbmkpath" + mkdir -p "$XBMK_CACHE/gnupath" "$XBMK_CACHE/xbmkpath" || \ + $err "cannot create gnupath" + export PATH="$XBMK_CACHE/xbmkpath:$XBMK_CACHE/gnupath:$PATH" || \ + $err "Can't create gnupath/xbmkpath" + ( + # set up python v3.x in PATH, in case it's not set up correctly. + # see code above that detected the correct python3 command. + cd "$XBMK_CACHE/xbmkpath" || $err "can't cd $XBMK_CACHE/xbmkpath" + ln -s "`command -v "$python"`" python || \ + $err "Can't set up python symlink in $XBMK_CACHE/xbmkpath" + ) || $err "Can't set up python symlink in $XBMK_CACHE/xbmkpath" xbmk_parent="y" fi diff --git a/script/trees b/script/trees index 045a49f7..43cd39cc 100755 --- a/script/trees +++ b/script/trees @@ -217,8 +217,8 @@ check_cross_compiler() $err "!mkxgcc $project/$xtree '$xfix' '$xgccargs'" # we only want to mess with hostcc to build xgcc - rm -f "$XBMK_CACHE/xbmkpath/"* || \ - $err "Cannot clear xbmkpath/"; : + rm -f "$XBMK_CACHE/gnupath/"* || \ + $err "Cannot clear gnupath/"; : done; return 0 } @@ -255,8 +255,8 @@ check_gnu_path() [ "$gnatfull" = "$gccfull" ] || return 1 ( - rm -f "$XBMK_CACHE/xbmkpath/"* || $err "Cannot clear xbmkpath/" - cd "$XBMK_CACHE/xbmkpath" || $err "Can't cd to xbmkpath/" + rm -f "$XBMK_CACHE/gnupath/"* || $err "Cannot clear gnupath/" + cd "$XBMK_CACHE/gnupath" || $err "Can't cd to gnupath/" for _gnubin in "$_gnudir/$2"*"-$_gnuver"; do [ -e "$_gnubin" ] || continue; _gnuutil="${_gnubin##*/}" x_ ln -s "$_gnubin" "${_gnuutil%"-$_gnuver"}" |