SmartAudio/package/allwinner/tina_multimedia/set_cedar_conf.sh

15 lines
179 B
Bash
Executable File

#!/bin/bash
line=`sed -n "/\<$1\>/p" $3`
if [ -n "$line" ]
then
if [ $4 == "y" ]
then
sed -i "s/$line/$1 = $2/g" $3
fi
else
if [ $4 == "y" ]
then
sed -i '3a '$1' = '$2'' $3
fi
fi