update to upstream 5.3.4
[automated-distro-installer] / fai / config / files / etc / apt / sources.list / preinst
1 #! /bin/bash
2
3 # replace {release} in a sources.list template with the value of $release
4
5
6 # $1 is the class name used
7 # $2 is the path to the file copied
8
9 # check if a variable of the form {varname} was used at all
10 grep -q '{' $2 || exit 0
11
12 if [ -z "$release" ]; then
13 echo "\$release is undefined. No substitution performed in $2."
14 exit 0
15 fi
16
17 sed -i -e "s/{release}/$release/g" $2