Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devtools
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
archlinux
devtools
Commits
82dcc19f
Commit
82dcc19f
authored
13 years ago
by
Pierre Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
commitpkg: Add ability to override the server
This might be useful for unofficial repos
parent
c5893672
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
commitpkg.in
+16
-14
16 additions, 14 deletions
commitpkg.in
with
16 additions
and
14 deletions
commitpkg.in
+
16
−
14
View file @
82dcc19f
...
...
@@ -42,7 +42,7 @@ pkgbase=${pkgbase:-$pkgname}
case
"
$cmd
"
in
commitpkg
)
if
((
$#
==
0
))
;
then
die
'usage: commitpkg <reponame> [-l limit] [-a arch] [commit message]'
die
'usage: commitpkg <reponame>
[-s server]
[-l limit] [-a arch] [commit message]'
fi
repo
=
"
$1
"
shift
...
...
@@ -51,20 +51,10 @@ case "$cmd" in
repo
=
"
${
cmd
%pkg
}
"
;;
*
)
die
'usage: commitpkg <reponame> [-l limit] [-a arch] [commit message]'
die
'usage: commitpkg <reponame>
[-s server]
[-l limit] [-a arch] [commit message]'
;;
esac
case
"
$repo
"
in
core|extra|testing|staging|kde-unstable|gnome-unstable
)
server
=
'gerolde.archlinux.org'
;;
community
*
|
multilib
*
)
server
=
'aur.archlinux.org'
;;
*
)
server
=
'gerolde.archlinux.org'
msg
"Non-standard repository
$repo
in use, defaulting to server
$server
"
;;
esac
# check if all local source files are under version control
for
s
in
"
${
source
[@]
}
"
;
do
if
[[
$s
!=
*
://
*
]]
&&
!
svn status
-v
"
$s
"
|
grep
-q
'^[ AMRX~]'
;
then
...
...
@@ -83,10 +73,10 @@ for i in 'changelog' 'install'; do
done
< <
(
sed
-n
"s/^[[:space:]]*
$i
=//p"
PKGBUILD
)
done
# see if any limit options were passed, we'll send them to rsync
rsyncopts
=(
-e
ssh
-p
--chmod
=
ug
=
rw,o
=
r
-c
-h
-L
--progress
--partial
-y
)
while
getopts
':l:a:'
flag
;
do
while
getopts
':l:a:
s:
'
flag
;
do
case
$flag
in
s
)
server
=
$2
;;
l
)
rsyncopts+
=(
"--bwlimit=
$2
"
)
;;
a
)
commit_arch
=
$2
;;
:
)
die
"Option requires an argument -- '
$OPTARG
'"
;;
...
...
@@ -95,6 +85,18 @@ while getopts ':l:a:' flag; do
done
shift
$((
OPTIND
-
1
))
if
[[
-z
$server
]]
;
then
case
"
$repo
"
in
core|extra|testing|staging|kde-unstable|gnome-unstable
)
server
=
'gerolde.archlinux.org'
;;
community
*
|
multilib
*
)
server
=
'aur.archlinux.org'
;;
*
)
server
=
'gerolde.archlinux.org'
msg
"Non-standard repository
$repo
in use, defaulting to server
$server
"
;;
esac
fi
if
[[
-n
$(
svn status
-q
)
]]
;
then
msgtemplate
=
"upgpkg:
$pkgbase
$(
get_full_version
)
"
$'
\n\n
'
if
[[
-n
$1
]]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment