blob: 6201dbb1d1b6def6514784424a9850881d727b40 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001#/bin/bash
2
3insert_place=$1
4feature_info=$2
5
6function usage {
7 printf "./insert_paras.sh [INSERT_PLACE] [TXT_FILE_TO_INSERT] \n"
8 printf "[INSERT_PLACE]: The feature option that you want to insert after. \n"
9 printf "[TXT_FILE_TO_INSERT]: The paragraph that you want to insert for\
10 the new feature option.\n"
11}
12
13echo "Insert place: $1"
14echo "Inserted file: $2"
15
16if [ $# -ne 2 ]; then
17 echo "Wrong usage, it should be:"
18 usage
19 exit 1
20fi
21
22for entry in config/*
23do
24echo "Folder: $entry"
25sed -i "/$insert_place =/r $2" $entry/internal_feature_option
26done
27
28