From: Tomasz Pala Date: Thu, 1 Apr 2004 20:02:41 +0000 (+0000) Subject: - do backup copy of index.theme, X-Git-Tag: auto/ac/XcursorTheme-1_0-6~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2FXcursorTheme.git;a=commitdiff_plain;h=085c8b10aa45dd97677c694b6b98e62fe274d120 - do backup copy of index.theme, - I know what it was - ~/.Xdefaults or ~/.Xresources has had to already exist in order the script to work at all Changed files: XcursorTheme-cursorconfig -> 1.3 --- diff --git a/XcursorTheme-cursorconfig b/XcursorTheme-cursorconfig index c94ba16..6217af7 100644 --- a/XcursorTheme-cursorconfig +++ b/XcursorTheme-cursorconfig @@ -1,8 +1,9 @@ #!/bin/sh alias nls='gettext -d cursorconfig' +file=~/.icons/default/index.theme themes="core `ls -d /usr/share/icons/*/cursors | sed -e 's,/usr/share/icons/,,;s,/cursors,,'`" -default=`grep -s Inherits ~/.icons/default/index.theme | cut -f2 -d=` +default=`grep -s Inherits $file | cut -f2 -d=` [ -z $default ] || default="($default)" theme=`dialog --title 'Cursorconfig' \ @@ -13,5 +14,6 @@ theme=`dialog --title 'Cursorconfig' \ [ -z $theme ] && exit 0 mkdir -p ~/.icons/default || exit 1 -echo "[Icon Theme]" > ~/.icons/default/index.theme -echo "Inherits=$theme" >> ~/.icons/default/index.theme +[ -f $file ] && mv -f $file{,.old} +echo "[Icon Theme]" > $file +echo "Inherits=$theme" >> $file