diff options
author | Marcin Slodkiewicz <slociu@wp.pl> | 2013-12-03 07:57:36 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2013-12-03 07:57:36 +0700 |
commit | 45374bcd46037e98818685dd3e1584a04b786668 (patch) | |
tree | 6597c7f3e59ddfbdc4066dd05cde0d459ea511ff /system/smart/doinst.sh | |
parent | fbace84e4f664a76c7efe958a11899d4db6980e2 (diff) | |
download | slackbuilds-45374bcd46037e98818685dd3e1584a04b786668.tar.gz |
system/smart: Added (meta-package manager).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/smart/doinst.sh')
-rw-r--r-- | system/smart/doinst.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/system/smart/doinst.sh b/system/smart/doinst.sh new file mode 100644 index 0000000000..6384c552d9 --- /dev/null +++ b/system/smart/doinst.sh @@ -0,0 +1,23 @@ +# Handle the incoming configuration files: +config() { + for infile in $1; do + NEW="$infile" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... + done +} + +# Prepare the new configuration file +config etc/smart/channels/channels.new + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications +fi + |