blob: b815863f733c41329cf7942d2a13ede710a14942 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/bash
_pkg=$1
mkdir -p $_pkg
pushd $_pkg
if [ ! -d .git ]; then
# Start a git repo for the package
# Add the remote origin
# Pull the package branch onto an unmodified branch
git init
git remote add arch git://projects.archlinux.org/svntogit/packages.git
# Export the repository
touch .git/git-daemon-export-ok
# Pass the -b flag to checkout to create the branches
extra="-b"
fi
git checkout ${extra} upstream
git pull arch packages/$_pkg
# Move PKGBUILD and files to the basedir
# Remove everything else from the repo
git checkout ${extra} master
# This produces a lot of merging conflicts
git merge upstream
# This apparently solves them
git mv trunk/* .
git rm -rf repos
# Remove the actual files
rm -rf trunk repos
# Commit everything
git commit -a -m "Converted to PBS"
# Return to the repo
popd >/dev/null
|