fixed missing fi in new functionfixed missing fi in new function
This commit is contained in:
parent
35a2ede88b
commit
65f26078f3
1 changed files with 11 additions and 9 deletions
20
functions
20
functions
|
|
@ -221,10 +221,10 @@ box-light(){
|
|||
bottom_border=${light_h}
|
||||
left_border=${light_v}
|
||||
right_border=${light_v}
|
||||
left_top_border=$(echo -e "\u23BE")
|
||||
right_top_border=$(echo -e "\u23CB")
|
||||
left_bottom_border=$(echo -e "\u23BF")
|
||||
right_bottom_border=$(echo -e "\u23CC")
|
||||
left_top_border=$(echo -e "\u25AB")
|
||||
right_top_border=$(echo -e "\u25AB")
|
||||
left_bottom_border=$(echo -e "\u25AB")
|
||||
right_bottom_border=$(echo -e "\u25AB")
|
||||
box_break_line=$(echo -e "\u23AF")
|
||||
;;&
|
||||
darwin* )
|
||||
|
|
@ -232,10 +232,10 @@ box-light(){
|
|||
bottom_border=${light_h}
|
||||
left_border=${light_v}
|
||||
right_border=${light_v}
|
||||
left_top_border=$(echo -e "⎾")
|
||||
right_top_border=$(echo -e "⏋")
|
||||
left_bottom_border=$(echo -e "⎿")
|
||||
right_bottom_border=$(echo -e "⏌")
|
||||
left_top_border=$(echo -e "▫")
|
||||
right_top_border=$(echo -e "▫")
|
||||
left_bottom_border=$(echo -e "▫")
|
||||
right_bottom_border=$(echo -e "▫")
|
||||
box_break_line=$(echo -e "⎯")
|
||||
;;
|
||||
esac
|
||||
|
|
@ -543,18 +543,20 @@ run-from-url(){
|
|||
args=${*:2}
|
||||
# check the interpreter using the shebang at the top of the file
|
||||
interpreter=$(curl -ks $url | head -n 1 | sed -e 's/\#\!//g' 2>/dev/null)
|
||||
boxline "interpreter=$interpreter"
|
||||
# In case of missing shebang, default to bash
|
||||
if [ -z $interpreter ] ; then
|
||||
interpreter="/bin/bash"
|
||||
fi
|
||||
logger boxline "Running online script $url with args $args"
|
||||
if [[ "$interpreter" == "/bin/bash "]] ; then
|
||||
if [[ "$interpreter" == "/bin/bash" ]] ; then
|
||||
run curl -H 'Cache-Control: no-cache' -ks $url | $interpreter -s -- $args
|
||||
else
|
||||
run curl -H 'Cache-Control: no-cache' -ks $url > ${url##*/}
|
||||
run $interpreter ${url##*/} $args
|
||||
ec=$?
|
||||
run rm ${url##*/}
|
||||
fi
|
||||
return $ec
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue