2024-09-25 00:51:25 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
declare path_script=$1
|
|
|
|
declare file_name=$(basename $0 .sh)
|
|
|
|
|
|
|
|
declare print_array
|
|
|
|
declare print_number=0
|
|
|
|
declare pick
|
|
|
|
|
|
|
|
echo "========Web========"
|
|
|
|
for i in "${path_script}/Config/${file_name}"/*;do
|
|
|
|
print_number=$((print_number + 1))
|
|
|
|
print_array[$print_number]=$(awk -F '.' '{print $1}' <<< "$(basename $i)")
|
|
|
|
echo "${print_number}.${print_array[$print_number]}"
|
|
|
|
done
|
|
|
|
echo "========Web========"
|
|
|
|
read -p "请输入要使用的功能:" pick
|
|
|
|
|
|
|
|
if [[ "${pick}" =~ [1-${#print_array[*]}] ]];then
|
2024-09-25 15:10:40 +08:00
|
|
|
bash "${path_script}/Config/${file_name}/${print_array[${pick}]}.sh" "${path_script}"
|
2024-09-25 00:51:25 +08:00
|
|
|
fi
|