Skip to content

Commit

Permalink
multiples fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Oct 17, 2024
1 parent 982163d commit 28da8cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion bin/osc-api-seems-valid.sh
Original file line number Diff line number Diff line change
@@ -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=$?
Expand Down
9 changes: 5 additions & 4 deletions oapi-cli.mk
Original file line number Diff line number Diff line change
@@ -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/
Expand Down

0 comments on commit 28da8cb

Please sign in to comment.