if [[ "$templatesource" == *windows* ]]; then
partition=/dev/sda2
fi
The * before and after * windows will match this "Ihavelotsofwindowshere"
Of we could have used "windows*" and anything that starts with "windows" will be matched etc...
bash, linux, wildcard, comparisonif, quot, templatesource, partition, dev, sda, fi, ihavelotsofwindowshere, matched, etc,