fsfe-website/build/filenames.sh
Reinhard Müller 785d03c6b9
All checks were successful
continuous-integration/drone/push Build is passing
Remove some spaghetti from build script
2020-04-24 08:52:01 +02:00

17 lines
363 B
Bash
Executable File

#!/usr/bin/env bash
inc_filenames=true
get_language(){
# extract language indicator from a given file name
echo "$(echo "$1" |sed -r 's:^.*\.([a-z]{2})\.[^\.]+$:\1:')";
}
get_shortname(){
# get shortened version of a given file name
# required for internal processing
#echo "$(echo "$1" | sed -r 's:\.[a-z]{2}.xhtml$::')";
echo "${1%.??.xhtml}"
}