Skip to content
Snippets Groups Projects
Verified Commit 552c7d28 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

add function to create snapshots

parent cb9e8375
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,9 @@ build: ...@@ -16,6 +16,9 @@ build:
- gem install jekyll - gem install jekyll
- gem install bundler - gem install bundler
- (cd _data && wget http://www.dynare.org/RePEc/cpm/dynare/wp.yml) - (cd _data && wget http://www.dynare.org/RePEc/cpm/dynare/wp.yml)
- pwd
- ls -la
- bash setup-snapshots.sh
- bundle install - bundle install
script: script:
- (cd assets/images/logo && make) - (cd assets/images/logo && make)
......
...@@ -170,6 +170,8 @@ exclude: ...@@ -170,6 +170,8 @@ exclude:
- /assets/images/logo/*.tex - /assets/images/logo/*.tex
- /assets/images/logo/*.sh - /assets/images/logo/*.sh
- /assets/RePEc/rdf2yml.py - /assets/RePEc/rdf2yml.py
- .gitlab-ci.yml
- setup-snapshots.sh
keep_files: keep_files:
- .git - .git
- /assets/images/* - /assets/images/*
......
#!/bin/bash
mkdir -p assets/snapshot
cd assets/snapshot
wget http://eris.dynare.org/snapshot/macosx.json
wget http://eris.dynare.org/snapshot/source.json
wget http://eris.dynare.org/snapshot/windows.json
wget http://eris.dynare.org/snapshot/windows-zip.json
declare -a arr=("macosx" "source" "windows" "windows-zip")
for dir in "${arr[@]}"
do
mkdir $dir
filenames=(`jq .[].filename $dir.json`)
timestamps=(`jq .[].date $dir.json`)
n=`jq length $dir.json`
n=`expr $n - 1`
cd $dir
for i in `seq 0 $n`;
do
filename="${filenames[i]%\"}"
filename="${filename#\"}"
timestamp="${timestamps[i]%\"}"
timestamp="${timestamp#\"}"
echo $filename $timestamp
touch -amt $timestamp $filename
done
cd ..
done
rm *.json
cd ../..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment