blob: 13786d65f9345b287811dfd8d31005de8e0f9762 [file] [log] [blame]
developer3abe1ad2022-01-24 11:13:32 +08001#!/bin/ash
2# This script is used for wrapping atenl daemon to ated
3
4# 0 is normal mode, 1 is used for specific commands
5mode="0"
6add_quote="0"
7cmd="atenl"
8
9for i in "$@"
10do
11 if [ "$i" = "-c" ]; then
12 cmd="${cmd} -c"
13 mode="1"
14 add_quote="1"
15 elif [ "${add_quote}" = "1" ]; then
16 cmd="${cmd} \"${i}\""
17 add_quote="0"
18 else
19 cmd="${cmd} ${i}"
20 fi
21done
22
23if [ "$mode" = "0" ]; then
24 killall atenl
25fi
26
27eval "${cmd}"