mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
mac: arrange for arm64 run on arm64
Makes 9term.app work again (not put you in an x86_64 jail).
This commit is contained in:
parent
a2567fcac9
commit
61e362add9
2 changed files with 11 additions and 3 deletions
|
@ -3,12 +3,16 @@ fshell=$(finger $(whoami) | sed -n 's/.*Shell: //p' | sed 1q)
|
||||||
SHELL=${fshell:-$SHELL}
|
SHELL=${fshell:-$SHELL}
|
||||||
PLAN9=${PLAN9:-/usr/local/plan9}
|
PLAN9=${PLAN9:-/usr/local/plan9}
|
||||||
cd $HOME
|
cd $HOME
|
||||||
|
arch=x86_64
|
||||||
|
if arch -arch arm64 date >/dev/null 2>&1; then
|
||||||
|
arch=arm64
|
||||||
|
fi
|
||||||
case "$SHELL" in
|
case "$SHELL" in
|
||||||
*/rc)
|
*/rc)
|
||||||
echo '
|
echo '
|
||||||
if(! ~ $PLAN9/bin $path)
|
if(! ~ $PLAN9/bin $path)
|
||||||
path=($path $PLAN9/bin)
|
path=($path $PLAN9/bin)
|
||||||
$PLAN9/bin/9term -l -W600x800 &
|
arch -arch '$arch' $PLAN9/bin/9term -l -W600x800 &
|
||||||
' | $SHELL -l
|
' | $SHELL -l
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -24,6 +28,6 @@ if ! [[ :$PATH: =~ :$PLAN9/bin: ]]
|
||||||
then
|
then
|
||||||
PATH=$PATH:$PLAN9/bin
|
PATH=$PATH:$PLAN9/bin
|
||||||
fi
|
fi
|
||||||
$PLAN9/bin/9term -l -W600x800 &
|
arch -arch $arch $PLAN9/bin/9term -l -W600x800 &
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
if [ -e ~/.bashrc ] ; then
|
if [ -e ~/.bashrc ] ; then
|
||||||
. ~/.bashrc
|
. ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
arch=x86_64
|
||||||
|
if arch -arch arm64 date >/dev/null 2>&1; then
|
||||||
|
arch=arm64
|
||||||
|
fi
|
||||||
PLAN9=${PLAN9:-/usr/local/plan9}
|
PLAN9=${PLAN9:-/usr/local/plan9}
|
||||||
|
|
||||||
bin=$PLAN9/bin
|
bin=$PLAN9/bin
|
||||||
|
@ -10,5 +14,5 @@ IFS=$'\n'
|
||||||
|
|
||||||
for file in $($bin/macargv)
|
for file in $($bin/macargv)
|
||||||
do
|
do
|
||||||
$bin/macedit "$file"
|
arch -arch $arch $bin/macedit "$file"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue