diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 935a287f..ef459e87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,6 +20,7 @@ pages: - rm public/lists/sane-mfgs-external.html - wget --quiet -O frontends.zip $URL/frontends/-/jobs/artifacts/master/download?job=archive - unzip -oqd public/snapshots frontends.zip + - ./public/snapshots/create-index.sh > public/snapshots/index.html artifacts: paths: - public diff --git a/snapshots/create-index.sh b/snapshots/create-index.sh new file mode 100755 index 00000000..9c3365f8 --- /dev/null +++ b/snapshots/create-index.sh @@ -0,0 +1,39 @@ +#!/bin/sh -eu + +cd $(dirname $0) + +BE_SRC_ARCHIVE=$(ls sane-backends-*-g*.tar.gz) +FE_SRC_ARCHIVE=$(ls sane-frontends-*-g*.tar.gz) +BE_GIT_ARCHIVE=$(ls sane-backends-git*.tar.gz) +FE_GIT_ARCHIVE=$(ls sane-frontends-git*.tar.gz) + +BE_SRC_DATE=$(date "+%F %T" -d "$(stat -c %y $BE_SRC_ARCHIVE | sed 's/\.0*$//')") +FE_SRC_DATE=$(date "+%F %T" -d "$(stat -c %y $FE_SRC_ARCHIVE | sed 's/\.0*$//')") +BE_GIT_DATE=$(date "+%F %T" -d "$(stat -c %y $BE_GIT_ARCHIVE | sed 's/\.0*$//')") +FE_GIT_DATE=$(date "+%F %T" -d "$(stat -c %y $FE_GIT_ARCHIVE | sed 's/\.0*$//')") + +BE_SRC_SIZE=$(stat -c %s $BE_SRC_ARCHIVE) +FE_SRC_SIZE=$(stat -c %s $FE_SRC_ARCHIVE) +BE_GIT_SIZE=$(stat -c %s $BE_GIT_ARCHIVE) +FE_GIT_SIZE=$(stat -c %s $FE_GIT_ARCHIVE) + +cat < + + + Index of /snapshots + + +

Index of /snapshots

+ + + + + + + +
[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]$BE_SRC_ARCHIVE$BE_SRC_DATE $BE_SRC_SIZE 
[   ]$BE_GIT_ARCHIVE$BE_GIT_DATE $BE_GIT_SIZE 
[   ]$FE_SRC_ARCHIVE$FE_SRC_DATE $FE_SRC_SIZE 
[   ]$FE_GIT_ARCHIVE$FE_GIT_DATE $FE_GIT_SIZE 

+ +EOF + +#rm $(basename $0)