Skip to content

Commit f2848b9

Browse files
committed
Add many scripts
Add many scripts Signed-off-by: Bensuperpc <[email protected]>
1 parent 4c17dce commit f2848b9

File tree

8 files changed

+69
-9
lines changed

8 files changed

+69
-9
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
submodules: 'recursive'
3030
fetch-depth: 0
3131
- name: "✅ Check bash syntax"
32-
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 {} \;
32+
run: sudo make check
3333
- name: "🛠️ Install"
3434
run: sudo make install
3535
- name: "🧹 Uninstall"

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@
1616
[submodule "git-extra-commands"]
1717
path = git-extra-commands
1818
url = https://github.com/unixorn/git-extra-commands.git
19+
[submodule "cryptr"]
20+
path = cryptr
21+
url = https://github.com/nodesocket/cryptr.git
22+
[submodule "others-dist"]
23+
path = others-dist
24+
url = https://github.com/MertcanGokgoz/UsefulBashScripts.git

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PROJECT_NAME := scripts
2121
SHELL := bash
2222
VERSION := 1.0
2323

24-
all: install
24+
all: check install
2525

2626
install:
2727
@echo "Install libraries..."
@@ -43,6 +43,17 @@ dist: clean sync-submodule
4343
7z a $(PROJECT_NAME)-$(VERSION).7z package_build/ -m0=lzma2 -mx=7 -mmt -ms
4444
@echo "$(PROJECT_NAME)-$(VERSION).7z done"
4545

46+
dist-full: clean sync-submodule
47+
mkdir -p package_build
48+
rsync -a --progress . package_build/
49+
7z a $(PROJECT_NAME)-full-$(VERSION).7z package_build/ -m0=lzma2 -mx=7 -mmt -ms
50+
@echo "$(PROJECT_NAME)-full-$(VERSION).7z done"
51+
52+
check:
53+
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 {} \;
54+
4655
clean:
4756
rm -rf package_build/
4857
rm -f $(PROJECT_NAME)-$(VERSION).7z
58+
rm -f $(PROJECT_NAME)-full-$(VERSION).7z
59+
@echo "Clean OK"

cryptr

Submodule cryptr added at 77d39c1

development/ninja_build.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
#
4+
# make.sh - Make ben libs
5+
#
6+
# Created by Bensuperpc at 6, October of 2020
7+
# Modified by Bensuperpc at 17, June of 2021
8+
#
9+
# Released into the Public domain with MIT licence
10+
# https://opensource.org/licenses/MIT
11+
#
12+
# Written with VisualStudio code 1.49.1
13+
# Script compatibility : Linux and Windows
14+
#
15+
# ==============================================================================
16+
17+
#https://developers.redhat.com/blog/2019/05/15/2-tips-to-make-your-c-projects-compile-3-times-faster/
18+
19+
mkdir -p build
20+
#Release/Debug/Coverage/MinSizeRel
21+
# #-DCMAKE_BUILD_TYPE=Release
22+
23+
cmake -S . -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache;distcc" -DCMAKE_C_COMPILER_LAUNCHER="ccache;distcc" $@
24+
25+
ninja -C build

install.sh

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ echo "copy done"
6161

6262
echo "Install ben's scripts..."
6363
echo "create symlink..."
64-
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 \;
65-
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 \;
66-
# Move it by remove file extension (if does not exit)
67-
find /usr/bin -lname '/usr/bin/ben_script/*.sh' | while read NAME ; do sudo mv -nv "${NAME}" "${NAME%.sh}" ; done
64+
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 \;
65+
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 \;
6866
echo "create symlink done"
6967
echo "Install ben's scripts done"
7068

@@ -86,4 +84,22 @@ echo "Install git-extra-commands..."
8684
find /usr/bin/ben_script/git-extra-commands/bin -type f -name "*" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
8785
echo "Install git-extra-commands done"
8886

89-
echo "Install done"
87+
echo "Install cryptr..."
88+
ln -s /usr/bin/ben_script/cryptr/cryptr.bash /usr/bin/cryptr
89+
echo "Install cryptr done"
90+
91+
echo "Install others-dist..."
92+
find /usr/bin/ben_script/others-dist/Scripts -type f -name "*.sh" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
93+
echo "Install others-dist done"
94+
95+
echo "Remove *.sh ..."
96+
# Move it by remove file extension (if does not exit)
97+
find /usr/bin -lname '/usr/bin/ben_script/*.sh' | while read NAME ; do sudo mv -nv "${NAME}" "${NAME%.sh}" ; done
98+
echo "Remove *.sh done"
99+
100+
echo "Remove *.py ..."
101+
# Move it by remove file extension (if does not exit)
102+
find /usr/bin -lname '/usr/bin/ben_script/*.py' | while read NAME ; do sudo mv -nv "${NAME}" "${NAME%.sh}" ; done
103+
echo "Remove *.py done"
104+
105+
echo "Install done"

others-dist

Submodule others-dist added at cada2fd

uninstall.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ cd /usr/bin/ben_script/git-extras
5959
sudo make uninstall
6060
echo "Removing git-extras done"
6161

62-
echo "Removing ben's scripts, git-scripts and git-extra-commands..."
62+
echo "Removing ben's scripts, git-scripts, git-extra-commands, cryptr..."
6363
echo "Remove symlink..."
6464
sudo find /usr/bin -lname '/usr/bin/ben_script/*' -delete
6565
echo "Remove symlink done"
6666

6767
sudo rm -fr /usr/bin/ben_script
6868

69-
echo "Removing ben's scripts, git-scripts, git-extra-commands done"
69+
echo "Removing ben's scripts, git-scripts, git-extra-commands, cryptr done"
7070
#sudo rm -fr /usr/bin/ben_script && sudo find /usr/bin/ -xtype l -delete
7171
echo "Removing done"

0 commit comments

Comments
 (0)