Add many scripts

Add many scripts

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
pull/2/head
Bensuperpc 2 years ago
parent 4c17dcef2d
commit f2848b9542

@ -29,7 +29,7 @@ jobs:
submodules: 'recursive'
fetch-depth: 0
- name: "✅ Check bash syntax"
run: find . -type f -name "*.sh" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" ! -path "*/git-extra-commands/*" -exec bash -n {} \;
run: sudo make check
- name: "🛠️ Install"
run: sudo make install
- name: "🧹 Uninstall"

6
.gitmodules vendored

@ -16,3 +16,9 @@
[submodule "git-extra-commands"]
path = git-extra-commands
url = https://github.com/unixorn/git-extra-commands.git
[submodule "cryptr"]
path = cryptr
url = https://github.com/nodesocket/cryptr.git
[submodule "others-dist"]
path = others-dist
url = https://github.com/MertcanGokgoz/UsefulBashScripts.git

@ -21,7 +21,7 @@ PROJECT_NAME := scripts
SHELL := bash
VERSION := 1.0
all: install
all: check install
install:
@echo "Install libraries..."
@ -43,6 +43,17 @@ dist: clean sync-submodule
7z a $(PROJECT_NAME)-$(VERSION).7z package_build/ -m0=lzma2 -mx=7 -mmt -ms
@echo "$(PROJECT_NAME)-$(VERSION).7z done"
dist-full: clean sync-submodule
mkdir -p package_build
rsync -a --progress . package_build/
7z a $(PROJECT_NAME)-full-$(VERSION).7z package_build/ -m0=lzma2 -mx=7 -mmt -ms
@echo "$(PROJECT_NAME)-full-$(VERSION).7z done"
check:
find . -type f -name "*.sh" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" ! -path "*/git-extra-commands/*" ! -path "*/cryptr/*" ! -path "*/others-dist/*" -exec $(SHELL) -n {} \;
clean:
rm -rf package_build/
rm -f $(PROJECT_NAME)-$(VERSION).7z
rm -f $(PROJECT_NAME)-full-$(VERSION).7z
@echo "Clean OK"

@ -0,0 +1 @@
Subproject commit 77d39c1bc30fd04906f745883070d40d3cf0fed4

@ -0,0 +1,25 @@
#!/bin/bash
set -euo pipefail
#
# make.sh - Make ben libs
#
# Created by Bensuperpc at 6, October of 2020
# Modified by Bensuperpc at 17, June of 2021
#
# Released into the Public domain with MIT licence
# https://opensource.org/licenses/MIT
#
# Written with VisualStudio code 1.49.1
# Script compatibility : Linux and Windows
#
# ==============================================================================
#https://developers.redhat.com/blog/2019/05/15/2-tips-to-make-your-c-projects-compile-3-times-faster/
mkdir -p build
#Release/Debug/Coverage/MinSizeRel
# #-DCMAKE_BUILD_TYPE=Release
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache;distcc" -DCMAKE_C_COMPILER_LAUNCHER="ccache;distcc" $@
ninja -C build

@ -61,10 +61,8 @@ echo "copy done"
echo "Install ben's scripts..."
echo "create symlink..."
find /usr/bin/ben_script -type f -name "*.sh" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" ! -path "*/git-extra-commands/*" -exec sudo ln -s {} /usr/bin \;
find /usr/bin/ben_script -type f -name "*.py" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" ! -path "*/git-extra-commands/*" -exec sudo ln -s {} /usr/bin \;
# Move it by remove file extension (if does not exit)
find /usr/bin -lname '/usr/bin/ben_script/*.sh' | while read NAME ; do sudo mv -nv "${NAME}" "${NAME%.sh}" ; done
find /usr/bin/ben_script -type f -name "*.sh" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" ! -path "*/git-extra-commands/*" ! -path "*/cryptr/*" ! -path "*/others-dist/*" -exec sudo ln -s {} /usr/bin \;
find /usr/bin/ben_script -type f -name "*.py" ! -path "*./git/*" ! -path "*/install.sh" ! -path "*/uninstall.sh" ! -path "*/Bash-Snippet/*" ! -path "*/git-scripts/*" ! -path "*/git-extras/*" ! -path "*/git-extra-commands/*" ! -path "*/cryptr/*" ! -path "*/others-dist/*" -exec sudo ln -s {} /usr/bin \;
echo "create symlink done"
echo "Install ben's scripts done"
@ -86,4 +84,22 @@ echo "Install git-extra-commands..."
find /usr/bin/ben_script/git-extra-commands/bin -type f -name "*" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
echo "Install git-extra-commands done"
echo "Install done"
echo "Install cryptr..."
ln -s /usr/bin/ben_script/cryptr/cryptr.bash /usr/bin/cryptr
echo "Install cryptr done"
echo "Install others-dist..."
find /usr/bin/ben_script/others-dist/Scripts -type f -name "*.sh" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
echo "Install others-dist done"
echo "Remove *.sh ..."
# Move it by remove file extension (if does not exit)
find /usr/bin -lname '/usr/bin/ben_script/*.sh' | while read NAME ; do sudo mv -nv "${NAME}" "${NAME%.sh}" ; done
echo "Remove *.sh done"
echo "Remove *.py ..."
# Move it by remove file extension (if does not exit)
find /usr/bin -lname '/usr/bin/ben_script/*.py' | while read NAME ; do sudo mv -nv "${NAME}" "${NAME%.sh}" ; done
echo "Remove *.py done"
echo "Install done"

@ -0,0 +1 @@
Subproject commit cada2fdd3be9ce6e0001a1b78f335940a8d07d85

@ -59,13 +59,13 @@ cd /usr/bin/ben_script/git-extras
sudo make uninstall
echo "Removing git-extras done"
echo "Removing ben's scripts, git-scripts and git-extra-commands..."
echo "Removing ben's scripts, git-scripts, git-extra-commands, cryptr..."
echo "Remove symlink..."
sudo find /usr/bin -lname '/usr/bin/ben_script/*' -delete
echo "Remove symlink done"
sudo rm -fr /usr/bin/ben_script
echo "Removing ben's scripts, git-scripts, git-extra-commands done"
echo "Removing ben's scripts, git-scripts, git-extra-commands, cryptr done"
#sudo rm -fr /usr/bin/ben_script && sudo find /usr/bin/ -xtype l -delete
echo "Removing done"

Loading…
Cancel
Save