Skip to content
Snippets Groups Projects
Commit 0b3ad0fc authored by Huste, Tobias's avatar Huste, Tobias
Browse files

Merge branch 'redo-hifis-title-background' into 'master'

SVG Jumbotrons: softlink to device specific subfolders

See merge request hifis/hifis.net!288
parents 6f7abda6 a6f844a7
No related branches found
No related tags found
1 merge request!288SVG Jumbotrons: softlink to device specific subfolders
......@@ -6,7 +6,7 @@
*.orig
# Jekyll-specific
_site/
_site
.sass-cache/
.jekyll-cache/
.jekyll-metadata
......@@ -14,9 +14,18 @@ _site/
# jekyll
public/
# bundle
.bundle
# node
node_modules/
# Misc
.directory
/.idea/
# Converted versions of jumbotrons
assets/img/jumbotrons/desktop/
assets/img/jumbotrons/display_2k/
assets/img/jumbotrons/phone/
assets/img/jumbotrons/tablet/
......@@ -101,5 +101,33 @@ do
fi
done
done
# Get all non-pixel'ed images for soft-linking (ignore subfolders)
images=$(find . -maxdepth 1 -iregex ".*\.\(svg\)")
for source_file in $images
do
echo "=== Processing $source_file ==="
for bp_name in "${!breakpoints[@]}"
do
target_file=$bp_name/$source_file;
target_width=${breakpoints[$bp_name]};
# Do not overwrite existing files
if [ -e "$target_file" ]
then
echo "Skip $target_file (already exists)"
continue
else
# Create a relative link to the original
echo "Creating link $target_file"
ln -sr "$source_file" "$target_file"
fi
done
done
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment