From 5b2367717c70e37df46d5af6cc44907835621585 Mon Sep 17 00:00:00 2001 From: Alnotz Date: Fri, 12 Apr 2024 13:56:55 +0200 Subject: [PATCH] Some fix --- weechat-plugins/essai/Makefile | 4 ++-- weechat-plugins/essai/build.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/weechat-plugins/essai/Makefile b/weechat-plugins/essai/Makefile index e84077b..6b5e93e 100644 --- a/weechat-plugins/essai/Makefile +++ b/weechat-plugins/essai/Makefile @@ -23,5 +23,5 @@ essai-command.o : essai-command.c essai.h essai-command.h $(WEECHAT_HEADER) gcc $(GCCFLAGS) -c essai-command.c -o obj/essai-command.o $(GCCLIBS) clean : - rm -r obj - rm -r lib + if [ -d obj ] ; then rm -r obj ; fi + if [ -d lib ] ; then rm -r lib ; fi diff --git a/weechat-plugins/essai/build.sh b/weechat-plugins/essai/build.sh index 12064a6..ecc6089 100644 --- a/weechat-plugins/essai/build.sh +++ b/weechat-plugins/essai/build.sh @@ -1,5 +1,10 @@ #!/bin/bash +if [ ! -d lib ] + then mkdir lib +fi + gcc $(pkg-config --cflags weechat) \ -shared -fPIC -Wall -Wextra src/essai.c src/essai-command.c -o lib/essai.so \ - $(pkg-config --libs weechat) && \ -mv -v lib/essai.so ${XDG_DATA_HOME}/weechat/plugins/ + $(pkg-config --libs weechat) && mv -v lib/essai.so ${XDG_DATA_HOME}/weechat/plugins/ + +rmdir lib