blob: a24355116e17836f38a7decf988233e437dc0b81 [file] [log] [blame]
ReStranger3d63ad72025-09-30 04:05:06 +03001#!/vendor/bin/sh
2#=============================================================================
3# Copyright (c) 2021 Qualcomm Technologies, Inc.
4# All Rights Reserved.
5# Confidential and Proprietary - Qualcomm Technologies, Inc.
6#=============================================================================
7
8write_with_check() {
9 local i=60
10 while [ $i -gt 0 ]
11 do
12 if [ -f "$1" ]; then
13 break
14 fi
15
16 sleep 1
17 i=$(($i-1))
18 done
19
20 if [ ! -f "$1" ]; then
21 exit 1
22 fi
23
24 echo $2 > $1
25}
26
27write_with_check "$1" "$2"