nicsensor/tool/nicsensor_v2/autoauth.sh
leimingsheng 88f871c880 feat(master) update to 1.10 base dev 2
1.[新增功能]解耦脚本参数配置功能, 脚本配置全部放到project.config中
2.[新增功能]增加对pmbus set命令的支持
3.[新增功能]增加setup.sh, 用于一键部署脚本
4.[功能优化]代码结构目录重新归档
2026-04-17 17:09:43 +08:00

23 lines
377 B
Bash

#!/bin/sh
# Get file conut first
file_num=`ls -l | wc -l`
i=2
while true
do
i=$(($i+1))
# Get filename by ls and awk
file=`ls -l | awk -v cnt=$i 'NR==cnt{print $9}'`
cmd="chmod +x $file"
echo "File ID: $i , $cmd"
# perform chmod
$cmd
if [ $i -eq $file_num ];then
echo "Done to add exec auth for every file"
break
fi
done