Skip to content

Commit

Permalink
[Try@install_criterion] : add a script for install criterion
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterLaplace committed Jun 19, 2023
1 parent fec1576 commit 26c3fc9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,19 @@ share: lib $(OBJ)
install: share
@-read -r -p "Do you want to install the shared engine library ? [Y/n] " response; \
if [ $$response = "Y" ] || [ $$response = "y" ] || [ $$response = "" ]; then \
sudo cp $(SHARE_NAME) /usr/lib/ \
sudo cp $(SHARE_NAME) /usr/local/lib/ && && sudo ldconfig \
&& $(ECHO) $(BOLD) $(GREEN)"\n► INSTALL SHARE SUCCESS 🧭!"$(DEFAULT) \
|| ($(ECHO) $(BOLD) $(RED)"\n► INSTALL SHARE FAILED 🧭"$(DEFAULT) && exit 1) \
fi

uninstall:
@-read -r -p "Do you want to uninstall the shared engine library ? [Y/n] " response; \
if [ $$response = "Y" ] || [ $$response = "y" ] || [ $$response = "" ]; then \
sudo rm -f /usr/local/lib/libengine.so && sudo ldconfig \
&& $(ECHO) $(BOLD) $(GREEN)"\n► UNINSTALL SHARE SUCCESS 🧭!"$(DEFAULT) \
|| ($(ECHO) $(BOLD) $(RED)"\n► UNINSTALL SHARE FAILED 🧭"$(DEFAULT) && exit 1) \
fi

## TEST MODE

build_tests: CFLAGS += -Wno-deprecated-declarations
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Copyright © 2023-2024 [Master_Laplace](https://github.com/MasterLaplace).

This libs has been carried out by:

* [![GitHub MasterLaplace](https://img.shields.io/github/followers/MasterLaplace?label=follow&style=social)](https://github.com/MasterLaplace)
* [![GitHub MasterLaplace](https://img.shields.io/github/followers/MasterLaplace?label=MasterLaplace&style=social)](https://github.com/MasterLaplace)

---
<p align="center">ME.inc</p>
28 changes: 28 additions & 0 deletions build/install_criterion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
URL="https://github.com/Snaipe/Criterion/releases/download/v2.3.2"
TARBALL="criterion-v2.3.2-linux-x86_64.tar.bz2"
DIR="criterion-v2.3.2"
DST="~/"
SUDO=sudo

cd /tmp
rm -f $TARBALL
rm -fr $DIR

wget $URL/$TARBALL
if [ $? != 0 ]; then
echo "failled, exiting"
exit;
fi

echo
echo "untaring $TARBALL"
tar xjf $TARBALL
if [ $? != 0 ]; then
echo "failled, exiting"
exit;
fi

echo "creating custom ld.conf"
$SUDO sh -c "echo "~/" > ~/criterion.conf"
echo "all good."

0 comments on commit 26c3fc9

Please sign in to comment.