Skip to content

Commit 56771a4

Browse files
committed
Improve speed
Improve speed Signed-off-by: Bensuperpc <[email protected]>
1 parent c64ce66 commit 56771a4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ echo "copy done"
5454

5555
echo "Install ben's scripts..."
5656
echo "create symlink..."
57-
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 \;
58-
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 \;
57+
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/*" | xargs -P$(nproc) -I{} sudo ln -s {} /usr/bin || true
58+
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/*" | xargs -P$(nproc) -I{} sudo ln -s {} /usr/bin || true
5959
echo "create symlink done"
6060
echo "Install ben's scripts done"
6161

@@ -70,19 +70,19 @@ sudo ./install.sh
7070
echo "Install git-extras done"
7171

7272
echo "Install git-scripts..."
73-
find /usr/bin/ben_script/git-scripts -type f -name "git-*" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
73+
find /usr/bin/ben_script/git-scripts -type f -name "git-*" ! -path "*./git/*" | xargs -P$(nproc) -I{} sudo ln -s {} /usr/bin || true
7474
echo "Install git-scripts done"
7575

7676
echo "Install git-extra-commands..."
77-
find /usr/bin/ben_script/git-extra-commands/bin -type f -name "*" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
77+
find /usr/bin/ben_script/git-extra-commands/bin -type f -name "*" ! -path "*./git/*" | xargs -P$(nproc) -I{} sudo ln -s {} /usr/bin || true
7878
echo "Install git-extra-commands done"
7979

8080
echo "Install cryptr..."
8181
ln -s /usr/bin/ben_script/cryptr/cryptr.bash /usr/bin/cryptr
8282
echo "Install cryptr done"
8383

8484
echo "Install others-dist..."
85-
find /usr/bin/ben_script/others-dist/Scripts -type f -name "*.sh" ! -path "*./git/*" -exec sudo ln -s {} /usr/bin \;
85+
find /usr/bin/ben_script/others-dist/Scripts -type f -name "*.sh" ! -path "*./git/*" | xargs -P$(nproc) -I{} sudo ln -s {} /usr/bin || true
8686
echo "Install others-dist done"
8787

8888
echo "Remove *.sh ..."

0 commit comments

Comments
 (0)