From 6c6fb817098f1671c7661b41a128034a3136ecd5 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Sat, 26 Sep 2020 01:00:54 +0200 Subject: [PATCH] Remove obsolete file and clean up layman.xml. --- .gitlab-pages-generator.sh | 104 ------------------------------------- layman.xml | 4 +- 2 files changed, 1 insertion(+), 107 deletions(-) delete mode 100755 .gitlab-pages-generator.sh diff --git a/.gitlab-pages-generator.sh b/.gitlab-pages-generator.sh deleted file mode 100755 index 24c7a0a..0000000 --- a/.gitlab-pages-generator.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh - -ROOT=$(realpath "${1:-.}") -TARGET=$(realpath "${2:-.public}") -declare -a PARTS=() - -function createDir() { - mkdir -p "${1}" -} - -function createDirInTarget() { - local dirpart="${1}" - local destinationdirectory=${dirpart/${ROOT}/${TARGET}} - echo $destinationdirectory -} - -function writeHTMLHeader() { - local targetfile="${1}" - local currentdir="${2}" - - cat < "${targetfile}" - - - - - gentoo-overlay/${currentdir} - - -

gentoo-overlay/${currentdir}

- - - -EOFOOT -} - -function writeHTMLFileentry() { - local targetfile="${1}" - local filename="${2}" - cat <> "${targetfile}" -
  • ${filename}
  • -EOFILE -} - -function pushPart() { - local part="${1}" - PARTS=("${PARTS[@]}" "${part}") -} - -function popPart() { - local index=$(expr ${#PARTS[@]} - 1) - unset PARTS[${index}] -} - -function renderParts() { - local IFS="/" - echo "${PARTS[*]}" -} - -function renderTargetPath() { - local parts=$(renderParts) - echo "${TARGET}${parts:+/}${parts}" -} - -function renderTargetFilename() { - local targetPath=$(renderTargetPath) - echo "${targetPath}/index.html" -} - -function processDir() { - local dir="${1}" - cd "${dir}" - local realpath=$(realpath .) - local files=$(ls) - local parts=$(renderParts) - local targetPath=$(renderTargetPath) - local targetFilename=$(renderTargetFilename) - mkdir -p "${targetPath}" - writeHTMLHeader "${targetFilename}" "${parts}" - writeHTMLFileentry "${targetFilename}" ".." - for f in ${files} ; do - if [ -f "${f}" ] ;then - cp "${f}" "${targetPath}" - writeHTMLFileentry "${targetFilename}" "${f}" - elif [ -d "${f}" ] ; then - writeHTMLFileentry "${targetFilename}" "${f}/" - pushPart "${f}" - processDir "${f}" - popPart - else - echo "Unknown: ${f}" - fi - done - writeHTMLFooter "${targetFilename}" - cd .. -} - -processDir "${ROOT}" diff --git a/layman.xml b/layman.xml index d0ff49d..2282321 100644 --- a/layman.xml +++ b/layman.xml @@ -10,7 +10,5 @@ Manuel Friedli https://gittr.ch/linux/gentoo-overlay.git - https://gittr.ch/linux/gentoo-overlay/commits/master.atom - https://gittr.ch/linux/gentoo-overlay/issues.atom - \ No newline at end of file + -- 2.45.2