/[sysadmin-cookbook]/recepies/debian/apt-sources.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /recepies/debian/apt-sources.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 78 - (hide annotations)
Sun May 17 12:19:17 2009 UTC (15 years ago) by dpavlin
File MIME type: application/x-sh
File size: 410 byte(s)
add custom repository to /etc/apt/sources.list
1 dpavlin 78 #!/bin/sh -x
2    
3     path=/etc/apt/sources.list
4     tmp=/tmp/sources.list
5    
6     cp $path $tmp
7    
8     function append() {
9     if ! grep "$1" $path ; then
10     echo "$1" >> $tmp
11     fi
12     }
13    
14     append "deb http://debian.rot13.org binary/"
15     append "deb http://debian.pkgs.cpan.org/debian unstable main"
16     #append "deb http://debian.rot13.org/debian unstable main"
17    
18     if ! diff -uw $path $tmp ; then
19     cp $path $path.old && mv $tmp $path
20     apt-get update
21     fi

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26