diff --git a/functions b/functions index 61c9767..40f7ec0 100644 --- a/functions +++ b/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 }