From 3d742322e2934df44db4b2b391943f415060e421 Mon Sep 17 00:00:00 2001 From: Alexei Bezborodov Date: Thu, 27 Feb 2025 22:25:17 +0300 Subject: [PATCH] Smal fix --- Script/img_and_wav2video | 2 +- Script/parse_arg_lib | 2 +- Script/ssh | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Script/img_and_wav2video b/Script/img_and_wav2video index c8be900..b7db0ff 100755 --- a/Script/img_and_wav2video +++ b/Script/img_and_wav2video @@ -57,7 +57,7 @@ img_and_wav2video -i image.jpg -a audio.wav -o out.mp4 -V mainloop=$(MakeMainLoop "all_params") echo "$mainloop" - eval "$mainloop" + #eval "$mainloop" # ------------------------------------------- diff --git a/Script/parse_arg_lib b/Script/parse_arg_lib index a904ce4..ad32ef8 100755 --- a/Script/parse_arg_lib +++ b/Script/parse_arg_lib @@ -111,5 +111,5 @@ function MakeMainLoop { while true; do cur_arg="$1"; [ "$cur_arg" = "--" ] && { shift; break; }; ProcessParams all_params_array Params2Case "$cur_arg" "$2"; shift; done ' - retun "${mainloop//all_params_array/$all_params_var_name}" + return "${mainloop//all_params_array/$all_params_var_name}" } diff --git a/Script/ssh b/Script/ssh index d07cf7d..4895c1e 100644 --- a/Script/ssh +++ b/Script/ssh @@ -15,3 +15,18 @@ ssh_for_openwpt_10.3_kamikadze() } mkalias_with_prefix 'ssh_for_openwpt_10.3_kamikadze' + +ssh_remote_port_forward() +{ + in_host_pattern=$1 + [ "${in_host_pattern}" = "" ] && printf "Укажите имя сервера, порт и новый порт\n" + remote_port=$2 + new_port=$3 + [ "${remote_port}" = "" ] && remote_port="8384" + [ "${new_port}" = "" ] && new_port="8385" + # Пробрасываем удалённый порт 127.0.0.1:${remote_port} с сервера на текущий компьютер + ssh -L ${new_port}:127.0.0.1:${remote_port} ${in_host_pattern} + firefox 127.0.0.1:${new_port} +} +mkalias_with_prefix 'ssh_remote_port_forward' +