Files
device_xiaomi_sapphire/rootdir/bin/init.qti.write.sh
boedhack99 fbba603490 topaz: Import full init kernel scripts
Change-Id: I2e9439a2e86528f985d6cbd2fdf7b5ee44400963
2023-12-02 17:01:05 +07:00

28 lines
517 B
Bash
Executable File

#!/vendor/bin/sh
#=============================================================================
# Copyright (c) 2021 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#=============================================================================
write_with_check() {
local i=60
while [ $i -gt 0 ]
do
if [ -f "$1" ]; then
break
fi
sleep 1
i=$(($i-1))
done
if [ ! -f "$1" ]; then
exit 1
fi
echo $2 > $1
}
write_with_check "$1" "$2"