Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F35011891
alias-python3-interpreter.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
416 B
Referenced Files
None
Subscribers
None
alias-python3-interpreter.sh
View Options
#!/bin/sh
set
-e
TARGET
=
/usr/local/bin/python3
if
[
-f
$TARGET
]
;
then
echo
"The python3 command already exists."
>
&
2
exit
2
fi
CANDIDATE
=
$(
pkg
info
|
grep
python3
|
awk
'{print $1}'
|
xargs
-n1
pkg
info
-l
|
grep
/usr/local/bin/python3
|
grep
-v
config
|
awk
'{print $1}'
|
head
-n1
)
if
[
-z
"
$CANDIDATE
"
]
;
then
echo
"Can't find Python 3 interpreter"
>
&
2
exit
1
fi
ln
-s
"
$CANDIDATE
"
$TARGET
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Tue, Jul 7, 23:54 (14 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3666134
Default Alt Text
alias-python3-interpreter.sh (416 B)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment