qubes-linux-template-builder/builder_setup
Marek Marczykowski-Górecki 5166ca5388 Simplify template name processing
Remove redundant function, move to separate file and load only this file
when only template name is needed. This way a lot less code gets loaded
on every make call.
2015-01-30 04:10:43 +01:00

34 lines
434 B
Bash
Executable File

#!/bin/bash
# Setup env variables
case "$DIST" in
fc*)
DISTRIBUTION=fedora
VERSION=${DIST/fc/}
;;
wheezy)
DISTRIBUTION=debian
VERSION=7
;;
jessie)
DISTRIBUTION=debian
VERSION=8
;;
*)
DISTRIBUTION="$DIST"
VERSION=
;;
esac
if [ -d "scripts_$DIST" ]; then
SCRIPTSDIR="scripts_$DIST"
else
SCRIPTSDIR="scripts_$DISTRIBUTION"
fi
CACHEDIR=cache_$DIST
export SCRIPTSDIR CACHEDIR
echo $DISTRIBUTION $VERSION