[Groonga-commit] groonga/groonga [master] [apt][ubuntu] add universe section automatically.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 10月 24日 (月) 15:20:06 JST


Kouhei Sutou	2011-10-24 06:20:06 +0000 (Mon, 24 Oct 2011)

  New Revision: 4e9a3038ff951a104204ed98fcd7902777731ebc

  Log:
    [apt][ubuntu] add universe section automatically.

  Modified files:
    packages/apt/build-deb.sh

  Modified: packages/apt/build-deb.sh (+16 -0)
===================================================================
--- packages/apt/build-deb.sh    2011-10-24 06:06:14 +0000 (6eee296)
+++ packages/apt/build-deb.sh    2011-10-24 06:20:06 +0000 (295b35c)
@@ -17,6 +17,22 @@ run()
     fi
 }
 
+distribution=debian
+lsb_release=/etc/lsb-release
+if [ -f $lsb_release ]; then
+    case $(grep "DISTRIB_ID=" $lsb_release) in
+	*Ubuntu*)
+	    distribution=ubuntu
+	    ;;
+    esac
+fi
+
+sources_list=/etc/apt/sources.list
+if [ "$distribution" = "ubuntu" ] && \
+    ! (grep '^deb' $sources_list | grep -q universe); then
+    run sed -i'' -e 's/main$/main universe/g' $sources_list
+fi
+
 if [ ! -x /usr/bin/aptitude ]; then
     run apt-get update
     run apt-get install -y aptitude




Groonga-commit メーリングリストの案内
Back to archive index