Skip to content

Commit

Permalink
Improve update-cache.sh script
Browse files Browse the repository at this point in the history
Requirements are now clear, simplified steps as well.
  • Loading branch information
eliroca committed Dec 2, 2024
1 parent df0f60d commit a003be4
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions dist/rpm/update-cache.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
#! /bin/sh
#!/usr/bin/bash

# requirements:
# bzip2 cpio perl-IO-Socket-SSL perl-Mojolicious
# perl-Mojolicious-Plugin-AssetPack ruby3.3-rubygem-sass

set -e

export LC_ALL='en_US.UTF-8'
export LANG='en_US.UTF-8'
osc up
rm -f _service\:*
rm -f *.tar *.cpio
osc service lr
# special call for tar buildtime service
osc service lr tar

SD=$PWD
cd MirrorCache
tools/generate-packed-assets
tar cvjf ../cache.tar.xz assets/cache assets/assetpack.db
mkdir -p MirrorCache-update-cache
rm -rf MirrorCache-update-cache/*
pushd MirrorCache-update-cache

cpio -id < ../MirrorCache-*.obscpio
pushd MirrorCache-*

./tools/generate-packed-assets
tar cvjf ../../cache.tar.xz assets/cache assets/assetpack.db

cd "$SD"
osc up
popd
popd
rm -rf MirrorCache-update-cache/*

0 comments on commit a003be4

Please sign in to comment.