Skip to content

Commit

Permalink
fix: zim-tools_linux-x86_64-2021-02-26
Browse files Browse the repository at this point in the history
This version removes need for fixRedirects.
Details: #86
  • Loading branch information
lidel committed Feb 27, 2021
1 parent 73550cb commit 819c05c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ notes.md
/snapshots
node_modules
/zim-tools
/kiwix-tools
/kiwix-tools

bin/zimdump
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@ RUN apt update
RUN apt -y install --no-install-recommends git ca-certificates curl wget apt-utils

# install:
# - zimdump from zim-tools_linux-x86_64-2021-02-12 (2.2.0 nightly)
# - node and yarn
# - go-ipfs
RUN curl - sL https://ipfs.io/ipfs/QmaXutNuSv9T7w62TzMMKUgtxs9g81GvMt1vKqduLn77Yj -o /usr/local/bin/zimdump \
&& chmod +x /usr/local/bin/zimdump \
&& curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh \
RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh \
&& bash nodesource_setup.sh \
&& apt -y install --no-install-recommends nodejs \
&& npm install -g yarn \
&& wget -nv https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_linux-amd64.tar.gz \
&& tar xvfz go-ipfs_v0.7.0_linux-amd64.tar.gz \
&& wget -nv https://dist.ipfs.io/go-ipfs/v0.8.0/go-ipfs_v0.8.0_linux-amd64.tar.gz \
&& tar xvfz go-ipfs_v0.8.0_linux-amd64.tar.gz \
&& mv go-ipfs/ipfs /usr/local/bin/ipfs \
&& rm -r go-ipfs && rm go-ipfs_v0.7.0_linux-amd64.tar.gz \
&& ipfs init --profile badgerds --empty-repo \
&& rm -r go-ipfs && rm go-ipfs_v0.8.0_linux-amd64.tar.gz \
&& ipfs init -p server,local-discovery,flatfs,randomports --empty-repo \
&& ipfs config --json 'Experimental.ShardingEnabled' true

# TODO: move repo init after external volume is mounted
Expand Down
5 changes: 4 additions & 1 deletion mirrorzim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ if [ -z ${MAIN_PAGE_VERSION+x} ]; then
MAIN_PAGE_VERSION=""
fi

printf "\nEnsure zimdump is present...\n"
PATH=$PATH:$(realpath ./bin)
which zimdump &> /dev/null || (curl --progress-bar -L https://ipfs.io/ipfs/bafybeialu4jsuhs3c3po7juutkwow6kdxeieqcbd6ipjc2tg7qqu7rmsm4 -o ./bin/zimdump && chmod +x ./bin/zimdump)

printf "\nDownload the zim file...\n"
printf "\nDownload and verify the zim file...\n"
ZIM_FILE_SOURCE_URL="$(./tools/getzim.sh download $WIKI_TYPE $WIKI_TYPE $LANGUAGE_CODE all maxi latest | grep 'URL:' | cut -d' ' -f3)"
ZIM_FILE=$(echo $ZIM_FILE_SOURCE_URL | rev | cut -d'/' -f1 | rev)
TMP_DIRECTORY="./tmp/$(echo $ZIM_FILE | cut -d'.' -f1)"
Expand Down

0 comments on commit 819c05c

Please sign in to comment.