diff --git a/main.sh b/main.sh index 165c308..c947799 100644 --- a/main.sh +++ b/main.sh @@ -45,7 +45,7 @@ show_file(){ # 获取当前时间,精确到秒,格式年月日时分秒 get_current_time() { local current_time - current_time=$(date +"%Y_%m_%d_%H_%M_%S") + current_time=$(date +"%Y%m%d_%H%M%S") echo "$current_time" } @@ -312,8 +312,8 @@ gm_option() { read -rp "请输入文件名称(不需要带文件后缀): " channel show_file package | grep "gm" read -rp "请输入包名(不需要带文件后缀):" package - echo -e "开始更新gm $channel $package" - gm_send_package "$channel" "$package" + echo -e "开始更新gm $channel.txt $package" + gm_send_package "$channel.txt" "$package" ;; *) echo -e "${red}无效的选项,请重新输入${NC}"