From 28da8cb5252e49a264b6a3c7887365874f8e78f6 Mon Sep 17 00:00:00 2001 From: Matthias Gatto Date: Thu, 17 Oct 2024 10:41:29 +0200 Subject: [PATCH] multiples fixes Signed-off-by: Matthias Gatto --- bin/osc-api-seems-valid.sh | 4 +++- oapi-cli.mk | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/osc-api-seems-valid.sh b/bin/osc-api-seems-valid.sh index 49fd59c..85640c7 100755 --- a/bin/osc-api-seems-valid.sh +++ b/bin/osc-api-seems-valid.sh @@ -1,8 +1,10 @@ #!/bin/bash # check if $1 is valide, if $2 is present, remove invalide file +config_path=$(realpath $(dirname $0))/../config.sh + shopt -s expand_aliases -source ../config.sh +source $config_path test=$(json-search -sn Request $1 | json-search -n properties) test_ret=$? diff --git a/oapi-cli.mk b/oapi-cli.mk index 59aa0c5..41654c3 100644 --- a/oapi-cli.mk +++ b/oapi-cli.mk @@ -1,20 +1,21 @@ #-Wincompatible-pointer-types $(CLI_NAME): $(OAPI_RULE_DEPEDENCIES) $(JSON_C_RULE) - $(CC) -g -Wall -Wextra -Wno-unused-function -Wno-unused-parameter main.c osc_sdk.c $(CURL_LD) $(JSON_C_LDFLAGS) $(CURL_CFLAGS) $${CURL_BASH_CFLAGS} $(JSON_C_CFLAGS) -o $(CLI_NAME) -DWITH_DESCRIPTION=1 $(CFLAGS) + $(CC) -g -std=gnu11 -Wall -Wextra -Wno-unused-function -Wno-unused-parameter main.c osc_sdk.c $(CURL_LD) $(JSON_C_LDFLAGS) $(CURL_CFLAGS) $${CURL_BASH_CFLAGS} $(JSON_C_CFLAGS) -o $(CLI_NAME) -DWITH_DESCRIPTION=1 $(CFLAGS) appimagetool-x86_64.AppImage: wget https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage chmod +x appimagetool-x86_64.AppImage -$(CLI_NAME)-x86_64.AppImage: $(CLI_NAME) appimagetool-x86_64.AppImage +$(CLI_NAME)-x86_64.AppImage: $(CLI_NAME) $(CLI_NAME)-completion.bash appimagetool-x86_64.AppImage mkdir -p $(CLI_NAME).AppDir/ mkdir -p $(CLI_NAME).AppDir/usr/ - install -D $$(curl-config --ca) $(CLI_NAME).AppDir/$$(curl-config --ca) - echo export CURL_CA_BUNDLE='$${APPDIR}'/$$(curl-config --ca) > $(CLI_NAME).AppDir/import-ssl.sh + install -D $$(curl-config --ca | tr -d '"') $(CLI_NAME).AppDir/$$(curl-config --ca) + echo export CURL_CA_BUNDLE='$${APPDIR}'/$$(curl-config --ca | tr -d '"') > $(CLI_NAME).AppDir/import-ssl.sh mkdir -p $(CLI_NAME).AppDir/usr/bin/ mkdir -p $(CLI_NAME).AppDir/usr/lib/ cat cli.desktop | sed "s/____cli_name____/$(CLI_NAME)/" > $(CLI_NAME).AppDir/$(CLI_NAME).desktop cat AppRun | sed "s/____cli_name____/$(CLI_NAME)/" > $(CLI_NAME).AppDir/AppRun + chmod +x $(CLI_NAME).AppDir/AppRun cp $(CLI_NAME) $(CLI_NAME).AppDir/usr/bin/ cp appimage-logo.png $(CLI_NAME).AppDir/ cp $(CLI_NAME)-completion.bash $(CLI_NAME).AppDir/usr/bin/