Add vconf key for on-demand launching IME
[platform/core/appfw/vconf-internal-keys.git] / remove_keys.sh
1 #!/bin/bash
2 PATH="/usr/bin:/bin:/usr/sbin:/sbin"
3
4 CMD=$1
5
6 if [ -z $CMD ]; then
7         echo "argument error : 1st arg is cmd (msg/del) "
8         echo "usage-1) ./remove-keys.sh msg"
9         echo "usage-2) ./remove-keys.sh del"
10         echo "usage-3) ./remove-keys.sh --> Error case"
11         exit 1
12 fi
13
14 buxton2ctl -d list-keys memory | sort > /opt/usr/bk_memory.txt
15 buxton2ctl -d list-keys system | sort > /opt/usr/bk_system.txt
16
17 MSG="[WARNING] CALLING VCONFTOOL OUTSIDE OF VCONF-INTERNAL-KEYS IS NOT ALLOWED."
18 list1=`comm -13 /opt/usr/vk_memory.txt /opt/usr/bk_memory.txt`
19
20
21
22 for file in $list1
23 do
24 if [ $CMD == "msg" ]; then
25         echo "$MSG ($file)"
26 elif [ $CMD == "del" ]; then
27         buxton2ctl -d -i unset memory $file
28 fi
29 done
30
31 list2=`comm -13 /opt/usr/vk_system.txt /opt/usr/bk_system.txt`
32 for file in $list2
33 do
34 if [ $CMD == "msg" ]; then
35         echo "$MSG ($file)"
36 elif [ $CMD == "del" ]; then
37         buxton2ctl -d -i unset system $file
38 fi
39 done
40
41 buxton2ctl remove-garbage-data system