Hi,
ich knobel gerade an einer eleganteren Lösung für folgendes:
Code
.../$plugin/plugin.sh --make # versucht das Plugin zu installieren
.../$plugin/plugin.sh --status # testet ob die Installation geklappt hat und gibt 0, 1 oder 2 zurück
Code
cd $plugin
plugin_status=`./plugin.sh --status`
case "$plugin_status" in
0) p_status="not found"; echo "$plugin=off" > ./tmp.$$ ;;
1) p_status="installed"; echo "$plugin=on" > ./tmp.$$ ;;
*) p_status="error"; echo "$plugin=off" > ./tmp.$$ ;;
esac
. ./tmp.$$
rm ./tmp.$$
Als Ergebnis bekomme ich so den neuen Wert für $burn:
Code
plugin=burn # das gewählte Plugin
burn=on # "on" wenn installiert, "off" wenn nicht installiert oder Fehler
Kann das auch ohne schreiben in eine temporäre Datei gelöst werden?
Gruss
Marc