~ubuntu-archive/ubuntu-archive-scripts/trunk

« back to all changes in this revision

Viewing changes to chdist-mainonly

  • Committer: Ubuntu Archive
  • Date: 2010-09-09 13:21:06 UTC
  • Revision ID: ubuntu-archive@lillypilly-20100909132106-vf90hsui7r781cky
rrsync: update to example script from rsync 3.0.7-1ubuntu1, to deal with options passed by newer rsync versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh
2
 
set -e
3
 
 
4
 
cmd="$1"
5
 
dist="$2"
6
 
shift 2
7
 
 
8
 
sourceslist="$HOME/.chdist/$dist/etc/apt/sources.list"
9
 
if [ ! -e "$sourceslist" ]; then
10
 
        exec chdist "$cmd" "$dist" "$@"
11
 
fi
12
 
 
13
 
tmp="$(mktemp -d)"
14
 
cleanup () {
15
 
        rm -rf "$tmp"
16
 
}
17
 
trap cleanup EXIT HUP INT QUIT TERM
18
 
 
19
 
grep -vw universe "$sourceslist" >"$tmp/sources.list"
20
 
chdist "$cmd" "$dist" -o Dir::Etc::sourcelist="$tmp/sources.list" "$@"