diff options
author | Erich Eckner <git@eckner.net> | 2021-01-07 15:59:28 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-01-07 15:59:28 +0100 |
commit | a30f2491ea246a9c36ada57e40b6a20c97d815e3 (patch) | |
tree | 4353ab1ba58a8a7c8c97f360c0c08261b79916b5 /archPackagesUpdate | |
parent | cb9653b6500f7724414a4688217dd8a65d9634cd (diff) | |
download | archlinuxewe-a30f2491ea246a9c36ada57e40b6a20c97d815e3.tar.xz |
archPackagesUpdate: mount and umount releng mirror
Diffstat (limited to 'archPackagesUpdate')
-rwxr-xr-x | archPackagesUpdate | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate index 884d0823a..1fa3c58b4 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -4,7 +4,8 @@ tmpDir="$(mktemp -d ~/tmp.archive.XXXXXX)" trap 'rm -rf --one-file-system "${tmpDir}"' EXIT pkgDir='/srv/http/vhosts/eckner.net/archlinuxewe/os' -pkgDir32='/mnt/mirror.archlinux32.org/x86_64/releng' +pkgDir32Mount='/mnt/mirror.archlinux32.org' +pkgDir32="${pkgDir32Mount}/x86_64/releng" pkgSrcDir=$(dirname $(readlink -f -n "$0")) submoduleDir=$(readlink -e "${pkgSrcDir}/../submodules") export SRCDEST="${HOME}/packageSources" @@ -238,6 +239,9 @@ if ${cleanUnsigned}; then }' printf ' + mount "%s"' "${pkgDir32Mount}" + + printf ' for arch in %s/* %s; do' \ "${pkgDir}" "${pkgDir32}" printf ' @@ -252,6 +256,8 @@ if ${cleanUnsigned}; then done date +%%s > %s/../lastupdate' \ "${pkgDir}" + printf ' + fusermount3 -u "%s"' "${pkgDir32Mount}" )" fi @@ -721,8 +727,11 @@ for ((i=0; i<${#pakete[@]}; i++)); do ssh archlinuxewe@eckner.net "$( printf 'tmp_archive=$(mktemp)\n' + printf 'mount "%s"\n' \ + "${pkgDir32Mount}" printf 'cat > "${tmp_archive}"\n' - printf 'trap "rm ${tmp_archive}" EXIT\n' + printf 'trap "rm ${tmp_archive}; fusermount3 -u %s" EXIT\n' \ + "${pkgDir32Mount}" printf ' entferneAltePakete() { @@ -828,6 +837,10 @@ if ${upload}; then printf ' err=0 + mount "%s"' \ + "${pkgDir32Mount}" + printf ' + for arch in %s/* %s' \ "${pkgDir}" "${pkgDir32}" printf '; do @@ -879,6 +892,10 @@ if ${upload}; then done + fusermount3 -u "%s"' \ + "${pkgDir32Mount}" + printf ' + exit ${err}' )" fi |