Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sébastien Villemot
website
Commits
552c7d28
Verified
Commit
552c7d28
authored
Dec 07, 2018
by
Houtan Bastani
Browse files
add function to create snapshots
parent
cb9e8375
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
552c7d28
...
...
@@ -16,6 +16,9 @@ build:
-
gem install jekyll
-
gem install bundler
-
(cd _data && wget http://www.dynare.org/RePEc/cpm/dynare/wp.yml)
-
pwd
-
ls -la
-
bash setup-snapshots.sh
-
bundle install
script
:
-
(cd assets/images/logo && make)
...
...
_config.yml
View file @
552c7d28
...
...
@@ -170,6 +170,8 @@ exclude:
-
/assets/images/logo/*.tex
-
/assets/images/logo/*.sh
-
/assets/RePEc/rdf2yml.py
-
.gitlab-ci.yml
-
setup-snapshots.sh
keep_files
:
-
.git
-
/assets/images/*
...
...
setup-snapshots.sh
0 → 100755
View file @
552c7d28
#!/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 ../..
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment