diff options
author | David P <megver83@parabola.nu> | 2018-06-23 00:38:32 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2018-06-23 00:38:32 -0400 |
commit | 74178b4f133ec39e2f2de1df38fb6fc5f5c93a43 (patch) | |
tree | de3ca9c926af22769988dd911d1f6dc3319a5ace | |
parent | 9bb95574da1d1e996166c11816cfdab23c56bb96 (diff) |
update script
Signed-off-by: David P <megver83@parabola.nu>
-rwxr-xr-x | run.sh | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -21,6 +21,10 @@ version=$1 args=${@#$1} path=${0%/*} +if ! [[ $RESET = "" ]]; then + reset="-e 's|^CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=""|;s|^CONFIG_DEFAULT_HOSTNAME=.*|CONFIG_DEFAULT_HOSTNAME="(none)"|'" +fi + usage() { cat <<EOM Usage: ${0##*/} [VERSION] [FILE1] [FILE2] ... @@ -29,6 +33,10 @@ Example: ${0##*/} 4.14 /usr/src/linux-4.14/.config To see a list of available versions, look at the files under the $path/versions directory. + +If the \$RESET environment variable is set (to anything), then the +CONFIG_LOCALVERSION and CONFIG_DEFAULT_HOSTNAME variables of the specified +config files will be set to the default values. EOM } @@ -58,7 +66,10 @@ deblob() { local configs=$(grep -v ^# $path/versions/$version) local i for i in $configs; do - sed -i "s|$i=.*|# $i is not set|" $1 + sed -i \ + -e "s|$i=.*|# $i is not set|" \ + $reset \ + $1 sleep 0.2 done } |