Skip to content

Commit f32ddb4

Browse files
committed
Update of the build directory
1 parent 2c24f55 commit f32ddb4

File tree

10 files changed

+145
-17
lines changed

10 files changed

+145
-17
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ Finally, this will delete the commands in the /usr/local/bin directory.
104104

105105
### With Macos:
106106

107-
git pull && ./build/uninstallation/macos/uninstall_macos.sh && ./build/installation/macos/install_macos.sh
107+
git pull; ./build/updating/macos/update_macos.sh
108108

109109
### or with npm:
110110

111-
git pull && npm run uninstall_macos && npm run install_macos
111+
npm run update_macos
112112

113113
### With Linux:
114114

115-
git pull && ./build/uninstallation/linux/uninstall_linux.sh && ./build/installation/linux/install_linux.sh
115+
git pull; ./build/updating/linux/update_linux.sh
116116

117117
### or with npm:
118118

119-
git pull && npm run uninstall_linux && npm run install_linux
119+
npm run update_linux
120120

121121
<a href="#summary" style="font-size:15px">Go back to summary ⬆️</a>
122122

build/installation/linux/install_linux.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22

3-
# If you have an installation problem, refer to the built_rescue directory
3+
OS=`uname`
4+
5+
checkOS() {
6+
[ $OS = "Linux" ] && return 0 || echo -e "\1b[31mYou are trying to run a macos version install, please try again with the target version of your system\x1b[0m" && exit 1
7+
}
48

59
createRmTrash() {
610
`cd && mkdir .RMTRASH`
@@ -23,7 +27,7 @@ symlinkEmptyTrash() {
2327
}
2428

2529
builtRmTrash() {
26-
symlinkRmTrash && symlinkEmptyTrash && createRmTrash && echo -e "\033[32mRmtrash successfully installed\033[0m"
30+
symlinkRmTrash && symlinkEmptyTrash && createRmTrash
2731
}
2832

29-
builtRmTrash
33+
checkOS && builtRmTrash && echo -e "\x1b[32mRmtrash successfully installed\x1b[0m" && exit 0 || echo -e "\x1b[31mRmtrash installation encountered a problem, please try again\x1b[0m" && exit 1

build/installation/macos/install_macos.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22

3-
# If you have an installation problem, refer to the built_rescue directory
3+
OS=`uname`
4+
5+
checkOS() {
6+
[ $OS = "Darwin" ] && return 0 || echo -e "\1b[31mYou are trying to run a macos version install, please try again with the target version of your system\x1b[0m" && exit 1
7+
}
48

59
createRmTrash() {
610
`cd && mkdir .RMTRASH`
@@ -23,7 +27,7 @@ symlinkEmptyTrash() {
2327
}
2428

2529
builtRmTrash() {
26-
symlinkRmTrash && symlinkEmptyTrash && createRmTrash && echo -e "\033[32mRmtrash successfully installed\033[0m"
30+
symlinkRmTrash && symlinkEmptyTrash && createRmTrash
2731
}
2832

29-
builtRmTrash
33+
checkOS && builtRmTrash && echo -e "\x1b[32mRmtrash successfully installed\x1b[0m" && exit 0 || echo -e "\x1b[31mRmtrash installation encountered a problem, please try again\x1b[0m" && exit 1

build/installation/rescue/README.md

Whitespace-only changes.

build/uninstallation/linux/uninstall_linux.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22

3-
# If you have an installation problem, refer to the debuilt_rescue directory
3+
OS=`uname`
4+
5+
checkOS() {
6+
[ $OS = "Darwin" ] && return 0 || echo -e "\1b[31mYou are trying to run a macos version uninstall, please try again with the target version of your system\x1b[0m" && exit 1
7+
}
48

59
removeRmTrash() {
610
`cd && rm -rf .RMTRASH`
@@ -21,7 +25,7 @@ unsymlinkEmptyRmTrash() {
2125
}
2226

2327
debuiltRmTrash() {
24-
removeRmTrash && unsymlinkRmTrash && unsymlinkEmptyRmTrash && echo -e "\033[32mRmtrash successfully uninstalled\033[0m"
28+
removeRmTrash && unsymlinkRmTrash && unsymlinkEmptyRmTrash
2529
}
2630

27-
debuiltRmTrash
31+
checkOS && debuiltRmTrash && echo -e "\x1b[32mRmtrash successfully uninstalled\x1b[0m" && exit 0 || echo -e "\x1b[31mRmtrash uninstallation encountered a problem, please try again\x1b[0m" && exit 1

build/uninstallation/macos/uninstall_macos.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22

3-
# If you have an installation problem, refer to the debuilt_rescue directory
3+
OS=`uname`
4+
5+
checkOS() {
6+
[ $OS = "Darwin" ] && return 0 || echo -e "\1b[31mYou are trying to run a macos version uninstall, please try again with the target version of your system\x1b[0m" && exit 1
7+
}
48

59
removeRmTrash() {
610
`cd && rm -rf .RMTRASH`
@@ -21,7 +25,7 @@ unsymlinkEmptyRmTrash() {
2125
}
2226

2327
debuiltRmTrash() {
24-
removeRmTrash && unsymlinkRmTrash && unsymlinkEmptyRmTrash && echo -e "\033[32mRmtrash successfully uninstalled\033[0m"
28+
removeRmTrash && unsymlinkRmTrash && unsymlinkEmptyRmTrash
2529
}
2630

27-
debuiltRmTrash
31+
checkOS && debuiltRmTrash && echo -e "\x1b[32mRmtrash successfully uninstalled\x1b[0m" && exit 0 || echo -e "\x1b[31mRmtrash uninstallation encountered a problem, please try again\x1b[0m" && exit 1

build/uninstallation/rescue/README.md

Whitespace-only changes.

build/updating/linux/update_linux.sh

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
3+
OS=`uname`
4+
5+
checkOS() {
6+
[ $OS = "Linux" ] && return 0 || echo -e "\1b[31mYou are trying to run a linux version update, please try again with the target version of your system\x1b[0m" && exit 1
7+
}
8+
9+
removeRmTrash() {
10+
`cd && rm -rf .RMTRASH`
11+
}
12+
13+
unsymlinkRmTrash() {
14+
if [ -e "/usr/local/bin/rmtrash" ]
15+
then
16+
rm "/usr/local/bin/rmtrash"
17+
fi
18+
}
19+
20+
unsymlinkEmptyRmTrash() {
21+
if [ -e "/usr/local/bin/emptyrmtrash" ]
22+
then
23+
rm "/usr/local/bin/emptyrmtrash"
24+
fi
25+
}
26+
27+
createRmTrash() {
28+
`cd && mkdir .RMTRASH`
29+
}
30+
31+
symlinkRmTrash() {
32+
if [ -e "/usr/local/bin" ]
33+
then
34+
PWD=`pwd`
35+
ln -s "$PWD/src/v_macos/rmTrash_vmacos.sh" "/usr/local/bin/rmtrash"
36+
fi
37+
}
38+
39+
symlinkEmptyTrash() {
40+
if [ -e "/usr/local/bin" ]
41+
then
42+
PWD=`pwd`
43+
ln -s "$PWD/src/v_macos/emptyRmTrash_vmacos.sh" "/usr/local/bin/emptyrmtrash"
44+
fi
45+
}
46+
47+
debuiltRmTrash() {
48+
removeRmTrash && unsymlinkRmTrash && unsymlinkEmptyRmTrash
49+
}
50+
51+
builtRmTrash() {
52+
symlinkRmTrash && symlinkEmptyTrash && createRmTrash
53+
}
54+
55+
checkOS && debuiltRmTrash && builtRmTrash && echo -e "\x1b[32mRmtrash successfully updated" && exit 0 || echo -e "\x1b[31mRmtrash updating encountered a problem, please try again\x1b[0m" && exit 1

build/updating/macos/update_macos.sh

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
3+
OS=`uname`
4+
5+
checkOS() {
6+
[ $OS = "Darwin" ] && return 0 || echo -e "\1b[31mYou are trying to run a macos version update, please try again with the target version of your system\x1b[0m" && exit 1
7+
}
8+
9+
removeRmTrash() {
10+
`cd && rm -rf .RMTRASH`
11+
}
12+
13+
unsymlinkRmTrash() {
14+
if [ -e "/usr/local/bin/rmtrash" ]
15+
then
16+
rm "/usr/local/bin/rmtrash"
17+
fi
18+
}
19+
20+
unsymlinkEmptyRmTrash() {
21+
if [ -e "/usr/local/bin/emptyrmtrash" ]
22+
then
23+
rm "/usr/local/bin/emptyrmtrash"
24+
fi
25+
}
26+
27+
createRmTrash() {
28+
`cd && mkdir .RMTRASH`
29+
}
30+
31+
symlinkRmTrash() {
32+
if [ -e "/usr/local/bin" ]
33+
then
34+
PWD=`pwd`
35+
ln -s "$PWD/src/v_macos/rmTrash_vmacos.sh" "/usr/local/bin/rmtrash"
36+
fi
37+
}
38+
39+
symlinkEmptyTrash() {
40+
if [ -e "/usr/local/bin" ]
41+
then
42+
PWD=`pwd`
43+
ln -s "$PWD/src/v_macos/emptyRmTrash_vmacos.sh" "/usr/local/bin/emptyrmtrash"
44+
fi
45+
}
46+
47+
debuiltRmTrash() {
48+
removeRmTrash && unsymlinkRmTrash && unsymlinkEmptyRmTrash
49+
}
50+
51+
builtRmTrash() {
52+
symlinkRmTrash && symlinkEmptyTrash && createRmTrash
53+
}
54+
55+
checkOS && debuiltRmTrash && builtRmTrash && echo -e "\x1b[32mRmtrash successfully updated" && exit 0 || echo -e "\x1b[31mRmtrash updating encountered a problem, please try again\x1b[0m" && exit 1

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"install_macos": "./build/installation/macos/install_macos.sh",
66
"install_linux": "./build/installation/linux/install_linux.sh",
77
"uninstall_macos": "./build/uninstallation/macos/uninstall_macos.sh",
8-
"uninstall_linux": "./build/uninstallation/linux/uninstall_linux.sh"
8+
"uninstall_linux": "./build/uninstallation/linux/uninstall_linux.sh",
9+
"update_macos": "git pull; ./build/updating/macos/update_macos.sh",
10+
"update_linux": "git pull; ./build/updating/linux/update_linux.sh"
911
},
1012
"author": "mrwaks",
1113
"license": "MIT"

0 commit comments

Comments
 (0)