Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
desktop
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
6
Merge Requests
6
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chakra
Packages
desktop
Commits
34612729
Commit
34612729
authored
Jul 21, 2011
by
Willing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warsow
parent
25e9be4a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
724 additions
and
0 deletions
+724
-0
.gitignore
.gitignore
+45
-0
copy-any.sh
copy-any.sh
+246
-0
get-any.sh
get-any.sh
+246
-0
unlock-repo.sh
unlock-repo.sh
+161
-0
warsow/warsow.desktop
warsow/warsow.desktop
+11
-0
warsow/warsow.launcher
warsow/warsow.launcher
+5
-0
warsow/wsw-server.launcher
warsow/wsw-server.launcher
+5
-0
warsow/wswtv-server.launcher
warsow/wswtv-server.launcher
+5
-0
No files found.
.gitignore
0 → 100644
View file @
34612729
_buildscripts
_repo
_sources
_temp
pkg
src
dbg
hdr
*~
build.sh
clean-builddir.sh
clean-workdir.sh
copy.sh
makepkg
move.sh
pkgrels-decrease.sh
pkgrels-increase.sh
pkgrels-reset.sh
rebuildlist-build.sh
rebuildlist-generate.sh
repoclean-local.sh
repoclean-remote.sh
show-config.sh
show-pkglists.sh
sync-complete.sh
sync-down.sh
sync-up-nodb.sh
sync-up.sh
remove.sh
recreate-database.sh
upload.sh
upload-nodb.sh
unlock-database.sh
*-cfg.conf
*-makepkg.conf
*-pkgs.conf
user.conf
*.db.tar.*
*.pkg.tar.*
*.tar.*
*.log
*.log*
copy-any.sh
0 → 100755
View file @
34612729
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2011 - Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
#
# global vars
#
_script_name
=
"Copy «Any» Package(s)"
_ver
=
"1.0"
_args
=
$(
echo
$1
)
_dest_repo
=
$(
echo
$2
)
_cur_repo
=
$(
pwd
|
awk
-F
'/'
'{print $NF}'
)
_needed_functions
=
"config_handling helpers messages"
_build_arch
=
"
$_arch
"
_carch
=
"x86_64"
[[
${
_arch
}
=
*
x
*
64
*
]]
&&
_carch
=
"i686"
# helper functions
for
subroutine
in
${
_needed_functions
}
;
do
source
_buildscripts/functions/
${
subroutine
}
done
for
cr
in
core platform desktop apps games
;
do
if
[
"
$(
echo
"
${
_cur_repo
}
"
|
cut
-d-
-f1
)
"
==
${
cr
}
]
;
then
_cur
=
$(
echo
"
${
_cur_repo
}
"
|
cut
-d-
-f2
)
fi
if
[
"
$(
echo
"
${
_dest_repo
}
"
|
cut
-d-
-f1
)
"
==
${
cr
}
]
;
then
_dest
=
$(
echo
"
${
_dest_repo
}
"
|
cut
-d-
-f2
)
fi
done
if
[
"
$_cur
"
==
""
]
;
then
_cur
=
$_cur_repo
fi
if
[
"
$_dest
"
==
""
]
;
then
_dest
=
$_dest_repo
fi
#
# Functions
#
lock_repo
()
{
newline
status_start
"locking «
$(
echo
"
${
1
}
"
|
sed
's/ /» «/g'
|
sed
's/+/» «/g'
)
» i686 and x86_64"
locker
=
"
$(
echo
"
${
_packer
}
"
|
cut
-d
' '
-f1
)
+
$(
echo
"
${
_packer
}
"
|
cut
-d
' '
-f2
)
"
lock
=
$(
curl
--silent
--data
"r=
$(
echo
"
${
1
}
"
|
sed
's/ /+/g'
)
&a=both&u=
${
_up
}
&n=
${
locker
}
"
http://chakra-project.org/packages/add-lock.php
)
if
[
"
$lock
"
=
"ok"
]
;
then
status_ok
else
status_fail
error
"
${
lock
}
"
newline
exit
1
fi
}
unlock_repo
()
{
newline
status_start
"unlocking «
$(
echo
"
${
1
}
"
|
sed
's/ /» «/g'
|
sed
's/+/» «/g'
)
» i686 and x86_64"
unlock
=
$(
curl
--silent
--data
"r=
$(
echo
"
${
1
}
"
|
sed
's/ /+/g'
)
&a=both&u=
${
_up
}
"
http://chakra-project.org/packages/remove-lock.php
)
if
[
"
$unlock
"
=
"ok"
]
;
then
status_ok
else
status_fail
error
"
${
unlock
}
"
fi
}
repo_clean
()
{
newline
status_start
"cleanning «
$1
-
${
_carch
}
»"
recreate_db
=
$(
curl
--silent
--data
"r=
$1
&a=
${
_carch
}
&u=
${
_up
}
"
http://chakra-project.org/packages/repo-clean.php
)
if
[
"
$recreate_db
"
=
"ok"
]
;
then
status_done
else
status_fail
error
"
${
recreate_db
}
"
fi
}
copy_packages_from_target
()
{
lock_repo
"
${
final_dest
}
"
newline
for
pkg
in
$copy_list
;
do
status_start
"copying «
$pkg
» from «
${
final_dest
}
-
${
_arch
}
» to «
${
final_dest
}
-
${
_carch
}
»"
unset
copypkg
#stripped_pkg_name=$(echo "${pkg}" | sed 's/\.pkg\.tar\..z//g')
copypkg
=
$(
curl
--silent
--data
"r=
${
final_dest
}
&a=
${
_arch
}
&u=
${
_up
}
&n=
${
pkg
}
"
http://chakra-project.org/packages/copy-any-pkg.php
)
if
[
"
$copypkg
"
=
"ok"
]
;
then
status_done
else
status_fail
error
"
${
copypkg
}
"
fi
done
repo_clean
"
${
final_dest
}
"
unlock_repo
"
${
final_dest
}
"
}
check_available_repos
()
{
msg
"Checking repos"
unset
checktr
checktr
=
$(
curl
--silent
--data
"u=
${
_up
}
"
http://chakra-project.org/packages/available-repos.php
)
if
[
"
$(
echo
"
$checktr
"
|
cut
-d
+
-f1
)
"
=
'ok'
]
;
then
for
_repo_check
in
${
checktr
}
;
do
if
[
"
${
_repo_check
}
"
=
"
${
_dest
}
"
]
;
then
repo_exist
=
"yes"
fi
done
if
[
"
${
repo_exist
}
"
!=
"yes"
]
;
then
newline
error
"the target repo «
${
_dest
}
» it is unknown"
error
"
$(
echo
"
$checktr
"
|
sed
's/ok+/available repos:/g'
)
"
newline
exit
1
fi
else
newline
error
"unable to check available repos"
if
[
"
$checktr
"
!=
""
]
;
then
error
"
$checktr
"
fi
newline
exit
1
fi
}
copy_any_packages
()
{
if
[
"
${
_dest
}
"
!=
""
]
;
then
check_available_repos
final_dest
=
${
_dest
}
else
final_dest
=
${
_cur
}
fi
newline
msg
"searching for «
${
_args
}
» in «
${
final_dest
}
-
${
_arch
}
»"
export
RSYNC_PASSWORD
=
$(
echo
${
_rsync_pass
}
)
repo_files
=
$(
rsync
-avh
--list-only
${
_rsync_user
}
@
${
_rsync_server
}
::dev/
${
final_dest
}
/
${
_arch
}
/ |
cut
-d
":"
-f
3 |
cut
-d
" "
-f
2
)
# Parses more than an arg separated by comma
parse_args
=
$(
echo
"
${
_args
}
"
|
sed
's/,/\n/g'
)
for
each_arg
in
$parse_args
;
do
partial_list
=
$(
echo
"
$repo_files
"
|
grep
${
each_arg
}
|
grep
'any.pkg.tar..*z$'
)
parse_list
=
$(
echo
${
partial_list
}
${
parse_list
}
)
done
copy_list
=
''
for
each_file
in
$parse_list
;
do
file_exist
=
'false'
for
each_add
in
$copy_list
;
do
if
[
"
${
each_file
}
"
=
"
${
each_add
}
"
]
;
then
file_exist
=
'true'
fi
done
if
[
"
${
file_exist
}
"
=
"false"
]
;
then
copy_list
=
$(
echo
"
${
copy_list
}
${
each_file
}
"
)
fi
done
unset
how_mani
for
count
in
$copy_list
;
do
((
how_mani++
))
done
if
[
"
$copy_list
"
!=
""
]
;
then
newline
warning
"(
${
how_mani
}
) packages match your search criteria:"
newline
echo
"
$(
echo
${
copy_list
}
|
tr
' '
'\012'
)
"
newline
question
"Do you really want to copy the package(s)? (y/n) "
while
true
;
do
read
yn
case
${
yn
}
in
[
yY]
*
)
time
copy_packages_from_target
newline
title
"All done"
break
;;
[
nN]
*
)
newline
title
"no packages are copied"
newline
break
;;
*
)
echo
"Enter (y)es or (n)o"
;;
esac
done
else
newline
error
"no packages match your search criteria"
newline
exit
1
fi
}
#
# startup
#
clear
title
"
${
_script_name
}
v
${
_ver
}
-
$_cur_repo
-
$_build_arch
"
if
[
"
${
_args
}
"
=
""
]
;
then
error
" !! You need to specify a target to copy,"
error
" single names like «attica» or simple regexp like ^kde are allowed."
newline
exit
1
fi
load_configs
check_rsync
check_accounts
# NOTE: Don't move this variable, need to be here.
_up
=
$(
echo
-n
"
$(
date
-u
+%W
)
${
_rsync_user
}
$(
echo
-n
"
${
_rsync_pass
}
"
|sha1sum|awk
'{print $1}'
)
"
|sha1sum|awk
'{print $1}'
)
copy_any_packages
newline
get-any.sh
0 → 100755
View file @
34612729
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2011 - Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
#
# global vars
#
_script_name
=
"Get «Any» Package(s)"
_ver
=
"1.0"
_args
=
$(
echo
$1
)
_dest_repo
=
$(
echo
$2
)
_cur_repo
=
$(
pwd
|
awk
-F
'/'
'{print $NF}'
)
_needed_functions
=
"config_handling helpers messages"
_build_arch
=
"
$_arch
"
_carch
=
"x86_64"
[[
${
_arch
}
=
*
x
*
64
*
]]
&&
_carch
=
"i686"
# helper functions
for
subroutine
in
${
_needed_functions
}
;
do
source
_buildscripts/functions/
${
subroutine
}
done
for
cr
in
core platform desktop apps games
;
do
if
[
"
$(
echo
"
${
_cur_repo
}
"
|
cut
-d-
-f1
)
"
==
${
cr
}
]
;
then
_cur
=
$(
echo
"
${
_cur_repo
}
"
|
cut
-d-
-f2
)
fi
if
[
"
$(
echo
"
${
_dest_repo
}
"
|
cut
-d-
-f1
)
"
==
${
cr
}
]
;
then
_dest
=
$(
echo
"
${
_dest_repo
}
"
|
cut
-d-
-f2
)
fi
done
if
[
"
$_cur
"
==
""
]
;
then
_cur
=
$_cur_repo
fi
if
[
"
$_dest
"
==
""
]
;
then
_dest
=
$_dest_repo
fi
#
# Functions
#
lock_repo
()
{
newline
status_start
"locking «
$(
echo
"
${
1
}
"
|
sed
's/ /» «/g'
|
sed
's/+/» «/g'
)
» i686 and x86_64"
locker
=
"
$(
echo
"
${
_packer
}
"
|
cut
-d
' '
-f1
)
+
$(
echo
"
${
_packer
}
"
|
cut
-d
' '
-f2
)
"
lock
=
$(
curl
--silent
--data
"r=
$(
echo
"
${
1
}
"
|
sed
's/ /+/g'
)
&a=both&u=
${
_up
}
&n=
${
locker
}
"
http://chakra-project.org/packages/add-lock.php
)
if
[
"
$lock
"
=
"ok"
]
;
then
status_ok
else
status_fail
error
"
${
lock
}
"
newline
exit
1
fi
}
unlock_repo
()
{
newline
status_start
"unlocking «
$(
echo
"
${
1
}
"
|
sed
's/ /» «/g'
|
sed
's/+/» «/g'
)
» i686 and x86_64"
unlock
=
$(
curl
--silent
--data
"r=
$(
echo
"
${
1
}
"
|
sed
's/ /+/g'
)
&a=both&u=
${
_up
}
"
http://chakra-project.org/packages/remove-lock.php
)
if
[
"
$unlock
"
=
"ok"
]
;
then
status_ok
else
status_fail
error
"
${
unlock
}
"
fi
}
repo_clean
()
{
newline
status_start
"cleanning «
$1
-
${
_arch
}
»"
recreate_db
=
$(
curl
--silent
--data
"r=
$1
&a=
${
_arch
}
&u=
${
_up
}
"
http://chakra-project.org/packages/repo-clean.php
)
if
[
"
$recreate_db
"
=
"ok"
]
;
then
status_done
else
status_fail
error
"
${
recreate_db
}
"
fi
}
copy_packages_from_target
()
{
lock_repo
"
${
final_dest
}
"
newline
for
pkg
in
$copy_list
;
do
status_start
"copying «
$pkg
» from «
${
final_dest
}
-
${
_carch
}
» to «
${
final_dest
}
-
${
_arch
}
»"
unset
copypkg
#stripped_pkg_name=$(echo "${pkg}" | sed 's/\.pkg\.tar\..z//g')
copypkg
=
$(
curl
--silent
--data
"r=
${
final_dest
}
&a=
${
_carch
}
&u=
${
_up
}
&n=
${
pkg
}
"
http://chakra-project.org/packages/copy-any-pkg.php
)
if
[
"
$copypkg
"
=
"ok"
]
;
then
status_done
else
status_fail
error
"
${
copypkg
}
"
fi
done
repo_clean
"
${
final_dest
}
"
unlock_repo
"
${
final_dest
}
"
}
check_available_repos
()
{
msg
"Checking repos"
unset
checktr
checktr
=
$(
curl
--silent
--data
"u=
${
_up
}
"
http://chakra-project.org/packages/available-repos.php
)
if
[
"
$(
echo
"
$checktr
"
|
cut
-d
+
-f1
)
"
=
'ok'
]
;
then
for
_repo_check
in
${
checktr
}
;
do
if
[
"
${
_repo_check
}
"
=
"
${
_dest
}
"
]
;
then
repo_exist
=
"yes"
fi
done
if
[
"
${
repo_exist
}
"
!=
"yes"
]
;
then
newline
error
"the target repo «
${
_dest
}
» it is unknown"
error
"
$(
echo
"
$checktr
"
|
sed
's/ok+/available repos:/g'
)
"
newline
exit
1
fi
else
newline
error
"unable to check available repos"
if
[
"
$checktr
"
!=
""
]
;
then
error
"
$checktr
"
fi
newline
exit
1
fi
}
copy_any_packages
()
{
if
[
"
${
_dest
}
"
!=
""
]
;
then
check_available_repos
final_dest
=
${
_dest
}
else
final_dest
=
${
_cur
}
fi
newline
msg
"searching for «
${
_args
}
» in «
${
final_dest
}
-
${
_carch
}
»"
export
RSYNC_PASSWORD
=
$(
echo
${
_rsync_pass
}
)
repo_files
=
$(
rsync
-avh
--list-only
${
_rsync_user
}
@
${
_rsync_server
}
::dev/
${
final_dest
}
/
${
_carch
}
/ |
cut
-d
":"
-f
3 |
cut
-d
" "
-f
2
)
# Parses more than an arg separated by comma
parse_args
=
$(
echo
"
${
_args
}
"
|
sed
's/,/\n/g'
)
for
each_arg
in
$parse_args
;
do
partial_list
=
$(
echo
"
$repo_files
"
|
grep
${
each_arg
}
|
grep
'any.pkg.tar..*z$'
)
parse_list
=
$(
echo
${
partial_list
}
${
parse_list
}
)
done
copy_list
=
''
for
each_file
in
$parse_list
;
do
file_exist
=
'false'
for
each_add
in
$copy_list
;
do
if
[
"
${
each_file
}
"
=
"
${
each_add
}
"
]
;
then
file_exist
=
'true'
fi
done
if
[
"
${
file_exist
}
"
=
"false"
]
;
then
copy_list
=
$(
echo
"
${
copy_list
}
${
each_file
}
"
)
fi
done
unset
how_mani
for
count
in
$copy_list
;
do
((
how_mani++
))
done
if
[
"
$copy_list
"
!=
""
]
;
then
newline
warning
"(
${
how_mani
}
) packages match your search criteria:"
newline
echo
"
$(
echo
${
copy_list
}
|
tr
' '
'\012'
)
"
newline
question
"Do you really want to copy the package(s)? (y/n) "
while
true
;
do
read
yn
case
${
yn
}
in
[
yY]
*
)
time
copy_packages_from_target
newline
title
"All done"
break
;;
[
nN]
*
)
newline
title
"no packages are copied"
newline
break
;;
*
)
echo
"Enter (y)es or (n)o"
;;
esac
done
else
newline
error
"no packages match your search criteria"
newline
exit
1
fi
}
#
# startup
#
clear
title
"
${
_script_name
}
v
${
_ver
}
-
$_cur_repo
-
$_build_arch
"
if
[
"
${
_args
}
"
=
""
]
;
then
error
" !! You need to specify a target to copy,"
error
" single names like «attica» or simple regexp like ^kde are allowed."
newline
exit
1
fi
load_configs
check_rsync
check_accounts
# NOTE: Don't move this variable, need to be here.
_up
=
$(
echo
-n
"
$(
date
-u
+%W
)
${
_rsync_user
}
$(
echo
-n
"
${
_rsync_pass
}
"
|sha1sum|awk
'{print $1}'
)
"
|sha1sum|awk
'{print $1}'
)
copy_any_packages
newline
unlock-repo.sh
0 → 100755
View file @
34612729
#!/bin/bash
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2011 - Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
#
# global vars
#
_script_name
=
"Unlock Repo"
_ver
=
"0.2"
_dest_repo
=
$(
echo
$1
)
_cur_repo
=
$(
pwd
|
awk
-F
'/'
'{print $NF}'
)
_needed_functions
=
"config_handling helpers messages"
_build_arch
=
"
$_arch
"
# helper functions
for
subroutine
in
${
_needed_functions
}
;
do
source
_buildscripts/functions/
${
subroutine
}
done
for
cr
in
core platform desktop apps games
;
do
if
[
"
$(
echo
"
${
_cur_repo
}
"
|
cut
-d-
-f1
)
"
==
${
cr
}
]
;
then
_cur
=
$(
echo
"
${
_cur_repo
}
"
|
cut
-d-
-f2
)
fi
if
[
"
$(
echo
"
${
_dest_repo
}
"
|
cut
-d-
-f1
)
"
==
${
cr
}
]
;
then
_dest
=
$(
echo
"
${
_dest_repo
}
"
|
cut
-d-
-f2
)
fi
done
if
[
"
$_cur
"
=
""
]
;
then
_cur
=
$_cur_repo
fi
if
[
"
$_dest
"
=
""
]
;
then
_dest
=
$_dest_repo
fi
#
# Functions
#
unlock_repo
()
{
newline
status_start
"unlocking «
${
final_dest
}
-
${
_arch
}
»"
unlock
=
$(
curl
--silent
--data
"r=
${
final_dest
}
&a=
${
_arch
}
&u=
${
_up
}
"
http://chakra-project.org/packages/remove-lock.php
)
if
[
"
$unlock
"
=
"ok"
]
;
then
status_ok
else
status_fail
error
"
${
unlock
}
"
fi
}
check_available_repos
()
{
msg
"Checking repos"
unset
checktr
checktr
=
$(
curl
--silent
--data
"u=
${
_up
}
"
http://chakra-project.org/packages/available-repos.php
)
if
[
"
$(
echo
"
$checktr
"
|
cut
-d
+
-f1
)
"
=
'ok'
]
;
then
for
_repo_check
in
${
checktr
}
;
do
if
[
"
${
_repo_check
}
"
=
"
${
_dest
}
"
]
;
then
repo_exist
=
"yes"
fi
done
if
[
"
${
repo_exist
}
"
!=
"yes"
]
;
then
newline
error
"the target repo «
${
_dest
}
» it is unknown"
error
"
$(
echo
"
$checktr
"
|
sed
's/ok+/available repos:/g'
)
"
newline
exit
1
fi
else
newline
error
"unable to check available repos"
if
[
"
$checktr
"
!=
""
]
;
then
error
"
$checktr
"
fi
newline
exit
1
fi
}
unlock
()
{
if
[
"
${
_dest
}
"
!=
""
]
;
then
check_available_repos
final_dest
=
${
_dest
}
else
final_dest
=
${
_cur
}
fi
newline
msg
"You are about to unlock «
${
final_dest
}
-
${
_arch
}
»"
msg
"please consider asking the repo locker first!"
newline
question
"Do you really want to continue? (y/n) "
while
true
;
do
read
yn
case
$yn
in
[
yY]
*
)
question
"lol really? (y/n) "
while
true
;
do
read
yn
case
$yn
in
[
yY]
*
)
unlock_repo
newline
title
"All done"
break