Merge "Multi-line layout." into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / scripts / add_smack_rule.sh
1 #!/bin/sh
2
3 SCRIPTDIR=`dirname $(readlink -f $0)`
4 SMACK_FILE=$SCRIPTDIR/all_smack.rule
5         
6 echo ""
7 echo "Add smack rule in $SMACK_FILE"
8 echo "==================================================="
9
10 echo "sdb root on"
11 sdb root on
12
13 while read rule; do
14         NO_BLANK=$(echo $rule | sed 's/ //g' | sed 's/  //g')
15         if [ ${#NO_BLANK} -lt 1 ]; then
16                 #echo "Blank"
17                 continue
18         elif [ `echo $NO_BLANK|cut -c1-1` = '#' ]; then
19                 #echo "Comment"
20                 continue
21         fi
22
23         echo "sdb shell \"echo $rule > /smack/load2\""
24         sdb shell "echo $rule > /smack/load2"
25 done < $SMACK_FILE
26
27 echo "==================================================="
28 echo ""