From 3a7e3d870fcf6c07cbe953b75b03e9b1717f38fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Fr=C3=A9rot?= Date: Fri, 27 Dec 2024 18:43:08 +0100 Subject: [PATCH] handling missing curl --- rtenets | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rtenets b/rtenets index 8005fdf..01d6f99 100755 --- a/rtenets +++ b/rtenets @@ -191,8 +191,12 @@ READMEMSG local licence="COPYING" if ! [ -f "${licence}" ]; then - info "setting licence to GPL by default, see https://www.gnu.org/licenses for more options" - curl "https://www.gnu.org/licenses/gpl-3.0.txt" > "${licence}" + if has_command curl; then + info "setting licence to GPL by default, see https://www.gnu.org/licenses for more options" + curl "https://www.gnu.org/licenses/gpl-3.0.txt" > "${licence}" + else + warning "please choose a free software licence, see https://www.gnu.org/licenses" + fi fi }