source /mnt/profile.js on boot + bugfix cmd fragment
This commit is contained in:
parent
3d52b69340
commit
2ba3cc185a
|
@ -283,7 +283,7 @@ AFRAME.registerComponent('isoterminal', {
|
||||||
env.push( 'export '+String(i).toUpperCase()+'="'+document.location[i]+'"')
|
env.push( 'export '+String(i).toUpperCase()+'="'+document.location[i]+'"')
|
||||||
}
|
}
|
||||||
env.map( (e) => emulator.serial0_send(`echo '${e}' >> /mnt/profile\n`) )
|
env.map( (e) => emulator.serial0_send(`echo '${e}' >> /mnt/profile\n`) )
|
||||||
let boot = `source /mnt/profile`
|
let boot = `source /mnt/profile; js "$(cat /mnt/profile.js)"`
|
||||||
// exec hash as extra boot cmd
|
// exec hash as extra boot cmd
|
||||||
if( document.location.hash.length > 1 ){
|
if( document.location.hash.length > 1 ){
|
||||||
boot += ` && cmd='${decodeURI(document.location.hash.substr(1))}' && $cmd`
|
boot += ` && cmd='${decodeURI(document.location.hash.substr(1))}' && $cmd`
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
# source xrsh env
|
# source xrsh env
|
||||||
source /mnt/profile.xrsh
|
source /mnt/profile.xrsh
|
||||||
|
|
||||||
# source javascript functions
|
|
||||||
js "$(cat /mnt/profile.js)"
|
|
||||||
|
|
||||||
## forward not-found commands to javascript (via jsh)
|
## forward not-found commands to javascript (via jsh)
|
||||||
command_not_found_handle(){
|
command_not_found_handle(){
|
||||||
echo "$1 not found, did you mean $1(...) (javascript?)"
|
echo "$1 not found, did you mean $1(...) (javascript?)"
|
||||||
|
@ -16,7 +13,7 @@ command_not_found_handle(){
|
||||||
}
|
}
|
||||||
|
|
||||||
resize
|
resize
|
||||||
#clear
|
test $HOSTNAME = localhost || clear
|
||||||
cat /mnt/motd
|
cat /mnt/motd
|
||||||
export PATH=$PATH:/mnt
|
export PATH=$PATH:/mnt
|
||||||
export PS1="\n[38;5;57mx[38;5;93mr[38;5;129ms[38;5;165mh [38;5;201m# \033[0m"
|
export PS1="\n[38;5;57mx[38;5;93mr[38;5;129ms[38;5;165mh [38;5;201m# \033[0m"
|
||||||
|
|
|
@ -43,5 +43,6 @@ test -d /dev/browser || {
|
||||||
setup_binaries
|
setup_binaries
|
||||||
setup_browser_dev
|
setup_browser_dev
|
||||||
setup_hook_dirs
|
setup_hook_dirs
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue