← Back to team overview

ubuntukylin-members team mailing list archive

[Branch ~ubuntukylin-members/ubuntukylin-default-settings/trunk] Rev 180: Add handling of duplicate sources.list entry

 

------------------------------------------------------------
revno: 180
committer: Aron Xu <happyaron.xu@xxxxxxxxx>
branch nick: ubuntukylin-default-settings
timestamp: Fri 2014-11-21 01:10:58 +0800
message:
  Add handling of duplicate sources.list entry
added:
  debian/ubuntukylin-default-settings.postinst


--
lp:ubuntukylin-default-settings
https://code.launchpad.net/~ubuntukylin-members/ubuntukylin-default-settings/trunk

Your team Ubuntu Kylin Members is subscribed to branch lp:ubuntukylin-default-settings.
To unsubscribe from this branch go to https://code.launchpad.net/~ubuntukylin-members/ubuntukylin-default-settings/trunk/+edit-subscription
=== added file 'debian/ubuntukylin-default-settings.postinst'
--- debian/ubuntukylin-default-settings.postinst	1970-01-01 00:00:00 +0000
+++ debian/ubuntukylin-default-settings.postinst	2014-11-20 17:10:58 +0000
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+FILE_MD5SUM=47d621d5a840d525a1663c12b2ab9e50
+FILE_PATH=/etc/apt/sources.list.d
+FILE_NAME=ubuntukylin.list
+
+if [ "$1" = install -o "$1" = upgrade ]; then
+	md5sum ${FILE_PATH}/* 2>/dev/null | grep -v ${FILE_NAME} | grep ${FILE_MD5SUM} | awk '{print $2}' | xargs rm -f
+fi
+
+#DEBHELPER#
+