diff --git a/README.md b/README.md index d655c7d..eb57aa9 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,14 @@ # ArchRepo -## Version 1 +## Version 1.1 -### Introduction +### Version 1 In a nutshell: * this script is run punctually, on a dedicated Arch VM; * Proces: * it takes all packages in the repository; * checks online if a new version is available * 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. diff --git a/update-repo.sh b/update-repo.sh index fe3a17f..cfdb730 100755 --- a/update-repo.sh +++ b/update-repo.sh @@ -86,10 +86,15 @@ init() { echo "ArchRepo update script" } +ftpFetch() { + ftp fetch $remote_repository/$repo_db_file $run_directory_path # TODO use real syntax ^^' +} + checkUpdates() { echo "Checking for updates:" 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 IFS='|' @@ -167,10 +172,17 @@ createPackage() { # Create package $1 cd $run_directory_path } +ftpSend() { + +} + +# TODO: try manually: can we update db file before sending to remote repo? addPackageToRepo() { # Add package $1 echo "Adding $1 to repository..." - 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 + #cp $run_directory_path/$1/$1-$2*.pkg.tar.xz $repo_directory + 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).+" if [[ $name =~ $reg ]]; then echo "Adding $1-headers and $1-docs to repository..."