Archive for April, 2007

Updating config files in gentoo

Gentoo leaves your (old) config files untouched after an update. Problem is, sometimes the old config files are incompatible with the new program.
This is a dialog code that shows the diffs and asks if the admin wants to accept the new file (almost always the case).


for line in $(find /etc/ -name "._cfg*")
do
origfile=$(echo $line|sed "s/\._cfg[0-9]*_//g");
echo $line "<=>" $origfile;
echo "Diff: ";
diff $origfile $line | less
echo -n "take it? [y|n] ";
read choice;
if [[ "$choice" == "y" ]]; then
mv $line $origfile;
else
echo "$line left as is.";
fi;
done

BTW: on Bash-ifs, the spaces around the comparator (e.g. ==) are necessary. If you leave them out, it is always true (String concatenation).

No Comments

Improving TUWEL

Ich hab mir gedacht, TUWEL schaut so unübersichtlich aus, da muss man doch was dagegen machen können.

Vorher: (3 Seiten mit Zeugs, das keinen interessiert)
tuwel-before-1 tuwel-before-2 tuwel-before-3

Und das is rausgekommen:
Nachher: tuwel-before
Kleinerer Font, ein paar Dinge entfernt und angeordnet.

Download:
Download Greasemonkey (Extension für Firefox)
Danach dieses kurze Script anklicken tuwel.user (js, 2 KB).

Verbesserungswünsche willkommen!
Ich finde jedenfalls, dass TUWEL lesbarer und übersichtlicher aussieht.

Update:
Ich hab den Text in der mittleren Spalte bisschen größer gemacht, und in Blockschrift. URL ist die gleiche.

Eigentlich könnte man das ganze ein bisschen weiter spinnen und einen ganzen Gothic-Mode schreiben ;-) Wer csszengarden kennt, weiß wo die Grenzen sind.

No Comments