handling missing curl

This commit is contained in:
Lucas Frérot 2024-12-27 18:43:08 +01:00
parent 09d7767a1a
commit 3a7e3d870f
No known key found for this signature in database
GPG Key ID: 03B54A50E3FBA7E8
1 changed files with 6 additions and 2 deletions

View File

@ -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
}