~ubuntu-branches/debian/stretch/arriero/stretch

« back to all changes in this revision

Viewing changes to scripts/new_repos.sh

  • Committer: Package Import Robot
  • Author(s): Margarita Manterola
  • Date: 2014-03-15 18:30:59 UTC
  • Revision ID: package-import@ubuntu.com-20140315183059-nap87isjg53t0tcf
Tags: upstream-0.5.1
ImportĀ upstreamĀ versionĀ 0.5.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
path="$1"
 
4
 
 
5
vcs_pull="git://git.debian.org/collab-maint/cinnamon"
 
6
vcs_push="git.debian.org:/git/collab-maint/cinnamon"
 
7
 
 
8
vcs_upstream="https://github.com/linuxmint"
 
9
 
 
10
if [ -e "$path" ]; then
 
11
    echo "Directory already exists" > /dev/stderr
 
12
    exit 1
 
13
fi
 
14
 
 
15
name=$(basename "$path")
 
16
 
 
17
mkdir "$path"
 
18
cd "$path"
 
19
 
 
20
git init
 
21
 
 
22
git remote add origin "${vcs_pull}/${name}.git"
 
23
git remote set-url --push origin "${vcs_push}/${name}.git"
 
24
 
 
25
git remote add "$name" "${vcs_upstream}/${name}.git"
 
26
 
 
27
git checkout --orphan master
 
28
git reset; git commit --allow-empty -m 'Initial debian branch'
 
29
 
 
30
git checkout --orphan upstream
 
31
git reset; git commit --allow-empty -m 'Initial upstream branch'
 
32
 
 
33
git checkout --orphan pristine-tar
 
34
git reset; git commit --allow-empty -m 'Initial pristine-tar branch'
 
35
 
 
36
git push origin master upstream pristine-tar --tags
 
37
 
 
38
git branch --set-upstream-to origin/master       master
 
39
git branch --set-upstream-to origin/upstream     upstream
 
40
git branch --set-upstream-to origin/pristine-tar pristine-tar
 
41
 
 
42
git config remote.origin.push refs/heads/master
 
43
git config --add remote.origin.push refs/heads/upstream
 
44
git config --add remote.origin.push refs/heads/pristine-tar
 
45
git config --add remote.origin.push refs/tags/debian/*
 
46
git config --add remote.origin.push refs/tags/upstream/*
 
47
 
 
48
git pull --all