Initial commit (WIP)
This commit is contained in:
parent
727392393e
commit
dfd59d987e
@ -1,10 +1,14 @@
|
|||||||
# ArchRepo
|
# ArchRepo
|
||||||
## Version 1
|
## Version 1.1
|
||||||
|
|
||||||
### Introduction
|
### Version 1
|
||||||
In a nutshell:
|
In a nutshell:
|
||||||
* this script is run punctually, on a dedicated Arch VM;
|
* this script is run punctually, on a dedicated Arch VM;
|
||||||
* Proces:
|
* Proces:
|
||||||
* it takes all packages in the repository;
|
* it takes all packages in the repository;
|
||||||
* checks online if a new version is available
|
* checks online if a new version is available
|
||||||
* if so build it and then add it to the repository
|
* if so build it and then add it to the repository
|
||||||
|
|
||||||
|
### Version 1.1
|
||||||
|
Version 1.1 is an adapted version 1, with remote repository. The idea is to replace NFS by FTP for everything related
|
||||||
|
with connection to repository.
|
||||||
|
@ -86,10 +86,15 @@ init() {
|
|||||||
echo "ArchRepo update script"
|
echo "ArchRepo update script"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ftpFetch() {
|
||||||
|
ftp fetch $remote_repository/$repo_db_file $run_directory_path # TODO use real syntax ^^'
|
||||||
|
}
|
||||||
|
|
||||||
checkUpdates() {
|
checkUpdates() {
|
||||||
echo "Checking for updates:"
|
echo "Checking for updates:"
|
||||||
upgraded_packages=""
|
upgraded_packages=""
|
||||||
stream=$(tar xOf $repo_directory/$repo_db_file --wildcards */desc | awk -f $awk_rules_file)
|
#stream=$(tar xOf $repo_directory/$repo_db_file --wildcards */desc | awk -f $awk_rules_file)
|
||||||
|
stream=$(tar xOf $run_directory_path/$repo_db_file --wildcards */desc | awk -f $awk_rules_file)
|
||||||
|
|
||||||
OIFS=$IFS
|
OIFS=$IFS
|
||||||
IFS='|'
|
IFS='|'
|
||||||
@ -167,10 +172,17 @@ createPackage() { # Create package $1
|
|||||||
cd $run_directory_path
|
cd $run_directory_path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ftpSend() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO: try manually: can we update db file before sending to remote repo?
|
||||||
addPackageToRepo() { # Add package $1
|
addPackageToRepo() { # Add package $1
|
||||||
echo "Adding $1 to repository..."
|
echo "Adding $1 to repository..."
|
||||||
cp $run_directory_path/$1/$1-$2*.pkg.tar.xz $repo_directory
|
#cp $run_directory_path/$1/$1-$2*.pkg.tar.xz $repo_directory
|
||||||
repo-add $repo_directory/$repo_db_file $repo_directory/$1-$2*.pkg.tar.xz
|
repo-add $repo_db_file $1-$2*.pkg.tar.xz
|
||||||
|
ftp send $repo_db_file $repo_db_file.old $remote_repository
|
||||||
|
ftp send packages $remote_repository
|
||||||
reg="(linux-lts).+"
|
reg="(linux-lts).+"
|
||||||
if [[ $name =~ $reg ]]; then
|
if [[ $name =~ $reg ]]; then
|
||||||
echo "Adding $1-headers and $1-docs to repository..."
|
echo "Adding $1-headers and $1-docs to repository..."
|
||||||
|
Loading…
Reference in New Issue
Block a user