Commit e998b05f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-app-update: sync with production, guard sed against --force filename

Sync repo copy with the actual script on download: adds create_full_list / create_content_index functions and requires/filelist processing. Pass `--` to sed so filenames starting with `-` aren't parsed as options (a stray `--force` file appeared in epm-requires/epm-filelist and broke the run). Co-Authored-By: 's avatarClaude Opus 4.7 (1M context) <noreply@anthropic.com>
parent 7f143b10
......@@ -11,6 +11,34 @@ scp epm@epm-update:/var/lib/eepm/eget-ipfs-db.txt /var/ftp/pub/download/epm-app-
ssh epm@epm-update /home/epm/eepm/bin/epm play --full-list-all </dev/null >/var/ftp/pub/download/epm-app-versions/epm-play-list.txt
create_full_list()
{
local dir="$1"
local output="$2"
cd $dir || exit
for i in * ; do
[ "$i" != "${i/.}" ] && continue
#echo "$i $(cat $i)"
sed "s|^|$i |" -- "$i"
done >$output
cd - >/dev/null
}
create_content_index()
{
local dir="$1"
local output="$2"
cd $dir || exit
for i in * ; do
[ "$i" != "${i/.}" ] && continue
#echo "$i $(cat $i)"
sed "s|$|\t$i|" -- "$i"
done >$output
cd - >/dev/null
}
create_full_list /var/ftp/pub/download/epm-app-versions/ epm-play-list-full.txt
# keep status and versions for every epm release
VERSION="$(cat /var/ftp/pub/download/epm-app-versions/eepm)" || exit
# use baseversion
......@@ -21,7 +49,8 @@ VERSION=$(echo "$VERSION" | sed -e 's|\.[0-9]*$||')
TDIR="/var/ftp/pub/download/eepm/releases/$VERSION/app-versions"
mkdir -p "$TDIR/"
rsync -a --delete-after /var/ftp/pub/download/epm-app-versions/ $TDIR/
scp epm@epm-update:/var/lib/eepm/eget-ipfs-db.txt $TDIR/
#scp epm@epm-update:/var/lib/eepm/eget-ipfs-db.txt $TDIR/
TDIR="/var/ftp/pub/download/eepm/releases/$VERSION/logs"
mkdir -p "$TDIR/"
......@@ -30,3 +59,15 @@ rsync -a --delete-after --exclude "*.git" epm@epm-update:/home/epm/epm-logs/ $TD
TDIR="/var/ftp/pub/download/eepm/releases/$VERSION/error-logs"
mkdir -p "$TDIR/"
rsync -a --delete-after --exclude "*.git" epm@epm-update:/home/epm/epm-errors/ $TDIR/
TDIR="/var/ftp/pub/download/eepm/releases/$VERSION/requires"
mkdir -p "$TDIR/"
rsync -a --delete-after --exclude "*.git" epm@epm-update:/home/epm/epm-requires/ $TDIR/
cat $TDIR/* | sort -u > /var/ftp/pub/download/eepm/releases/$VERSION/app-versions/epm-play-requires.txt
create_content_index $TDIR /var/ftp/pub/download/eepm/releases/$VERSION/app-versions/epm-play-requires_index.txt
TDIR="/var/ftp/pub/download/eepm/releases/$VERSION/filelist"
mkdir -p "$TDIR/"
rsync -a --delete-after --exclude "*.git" epm@epm-update:/home/epm/epm-filelist/ $TDIR/
create_content_index $TDIR /var/ftp/pub/download/eepm/releases/$VERSION/app-versions/epm-play-content_index.txt
gzip /var/ftp/pub/download/eepm/releases/$VERSION/app-versions/epm-play-content_index.txt
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment