1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,93 @@ |
1 |
+#! /bin/bash |
|
2 |
+ |
|
3 |
+readonly Script_Name="Declare This Minimal Ramize-Physave In Use" |
|
4 |
+readonly length_of_Script_Name=$(echo "${#Script_Name}") |
|
5 |
+ |
|
6 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
7 |
+readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
8 |
+ |
|
9 |
+ |
|
10 |
+mkdir --parents "/root/apbin/Minimal Ramize-Physave" |
|
11 |
+ |
|
12 |
+readonly symlink_position="/root/apbin/Minimal Ramize-Physave/In Use" |
|
13 |
+ |
|
14 |
+ |
|
15 |
+Contents_of_Config_File____Installer_Behavior=$(cat "$Follpath____This_Script/0000-Config/Installer Behavior") |
|
16 |
+ |
|
17 |
+case "$Contents_of_Config_File____Installer_Behavior" in |
|
18 |
+ "backup") |
|
19 |
+ readonly Installer_Behavior="backup" |
|
20 |
+ ;; |
|
21 |
+ "overwrite") |
|
22 |
+ readonly Installer_Behavior="overwrite" |
|
23 |
+ ;; |
|
24 |
+ *) |
|
25 |
+ readonly Installer_Behavior="backup" |
|
26 |
+ ;; |
|
27 |
+esac |
|
28 |
+ |
|
29 |
+#echo "Installer_Behavior: $Installer_Behavior" |
|
30 |
+ |
|
31 |
+cd "$Follpath____This_Script/../Minimal Ramize-Physave" |
|
32 |
+ |
|
33 |
+ |
|
34 |
+echo |
|
35 |
+echo |
|
36 |
+perl -E "say '*' x $length_of_Script_Name" |
|
37 |
+echo "$Script_Name" |
|
38 |
+perl -E "say '*' x $length_of_Script_Name" |
|
39 |
+ |
|
40 |
+readonly Follpath____Minimal_Ramize_Physave=$(pwd) |
|
41 |
+ |
|
42 |
+ |
|
43 |
+ |
|
44 |
+echo |
|
45 |
+echo |
|
46 |
+echo "Trying to create symlink at: |
|
47 |
+ |
|
48 |
+ $symlink_position |
|
49 |
+ |
|
50 |
+Destination: |
|
51 |
+ |
|
52 |
+ $Follpath____Minimal_Ramize_Physave" |
|
53 |
+ |
|
54 |
+echo |
|
55 |
+echo |
|
56 |
+ |
|
57 |
+ |
|
58 |
+if [ "$Installer_Behavior" = "overwrite" ] |
|
59 |
+then |
|
60 |
+ if [ -e "$symlink_position" ] || [ -L "$symlink_position" ] |
|
61 |
+ then |
|
62 |
+ rm "$symlink_position" |
|
63 |
+ fi |
|
64 |
+else |
|
65 |
+ if [ -e "$symlink_position" ] || [ -L "$symlink_position" ] |
|
66 |
+ then |
|
67 |
+ mv --backup=numbered "$symlink_position" "$symlink_position-backup" |
|
68 |
+ result_code="$?" |
|
69 |
+ |
|
70 |
+ if [ "$result_code" != 0 ] |
|
71 |
+ then |
|
72 |
+ echo "Failed to make backup! Aborting." |
|
73 |
+ |
|
74 |
+ exit 2 |
|
75 |
+ fi |
|
76 |
+ fi |
|
77 |
+fi |
|
78 |
+ |
|
79 |
+ |
|
80 |
+ln --symbolic "$Follpath____Minimal_Ramize_Physave" "$symlink_position" |
|
81 |
+ |
|
82 |
+result_code="$?" |
|
83 |
+ |
|
84 |
+ |
|
85 |
+if [ "$result_code" = 0 ] |
|
86 |
+then |
|
87 |
+ echo "Made symlink!" |
|
88 |
+ exit 0 |
|
89 |
+else |
|
90 |
+ echo "Somehow failed to make symlink!" |
|
91 |
+fi |
|
92 |
+ |
|
93 |
+exit 1 |
|
0 | 94 |
\ No newline at end of file |
1 | 95 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,90 @@ |
1 |
+#! /bin/bash |
|
2 |
+ |
|
3 |
+readonly Script_Name="Declare This Ramize-Physave In Use" |
|
4 |
+readonly length_of_Script_Name=$(echo "${#Script_Name}") |
|
5 |
+ |
|
6 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
7 |
+readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
8 |
+ |
|
9 |
+readonly symlink_position="/root/apbin/Ramize-Physave/In Use" |
|
10 |
+ |
|
11 |
+ |
|
12 |
+Contents_of_Config_File____Installer_Behavior=$(cat "$Follpath____This_Script/0000-Config/Installer Behavior") |
|
13 |
+ |
|
14 |
+case "$Contents_of_Config_File____Installer_Behavior" in |
|
15 |
+ "backup") |
|
16 |
+ readonly Installer_Behavior="backup" |
|
17 |
+ ;; |
|
18 |
+ "overwrite") |
|
19 |
+ readonly Installer_Behavior="overwrite" |
|
20 |
+ ;; |
|
21 |
+ *) |
|
22 |
+ readonly Installer_Behavior="backup" |
|
23 |
+ ;; |
|
24 |
+esac |
|
25 |
+ |
|
26 |
+#echo "Installer_Behavior: $Installer_Behavior" |
|
27 |
+ |
|
28 |
+cd "$Follpath____This_Script/../Ramize-Physave" |
|
29 |
+ |
|
30 |
+ |
|
31 |
+echo |
|
32 |
+echo |
|
33 |
+perl -E "say '*' x $length_of_Script_Name" |
|
34 |
+echo "$Script_Name" |
|
35 |
+perl -E "say '*' x $length_of_Script_Name" |
|
36 |
+ |
|
37 |
+readonly Follpath____Ramize_Physave=$(pwd) |
|
38 |
+ |
|
39 |
+ |
|
40 |
+ |
|
41 |
+echo |
|
42 |
+echo |
|
43 |
+echo "Trying to create symlink at: |
|
44 |
+ |
|
45 |
+ $symlink_position |
|
46 |
+ |
|
47 |
+Destination: |
|
48 |
+ |
|
49 |
+ $Follpath____Ramize_Physave" |
|
50 |
+ |
|
51 |
+echo |
|
52 |
+echo |
|
53 |
+ |
|
54 |
+ |
|
55 |
+if [ "$Installer_Behavior" = "overwrite" ] |
|
56 |
+then |
|
57 |
+ if [ -e "$symlink_position" ] || [ -L "$symlink_position" ] |
|
58 |
+ then |
|
59 |
+ rm "$symlink_position" |
|
60 |
+ fi |
|
61 |
+else |
|
62 |
+ if [ -e "$symlink_position" ] || [ -L "$symlink_position" ] |
|
63 |
+ then |
|
64 |
+ mv --backup=numbered "$symlink_position" "$symlink_position-backup" |
|
65 |
+ result_code="$?" |
|
66 |
+ |
|
67 |
+ if [ "$result_code" != 0 ] |
|
68 |
+ then |
|
69 |
+ echo "Failed to make backup! Aborting." |
|
70 |
+ |
|
71 |
+ exit 2 |
|
72 |
+ fi |
|
73 |
+ fi |
|
74 |
+fi |
|
75 |
+ |
|
76 |
+ |
|
77 |
+ln --symbolic "$Follpath____Ramize_Physave" "$symlink_position" |
|
78 |
+ |
|
79 |
+result_code="$?" |
|
80 |
+ |
|
81 |
+ |
|
82 |
+if [ "$result_code" = 0 ] |
|
83 |
+then |
|
84 |
+ echo "Made symlink!" |
|
85 |
+ exit 0 |
|
86 |
+else |
|
87 |
+ echo "Somehow failed to make symlink!" |
|
88 |
+fi |
|
89 |
+ |
|
90 |
+exit 1 |
|
0 | 91 |
\ No newline at end of file |
0 | 5 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,27 @@ |
1 |
+#! /bin/bash |
|
2 |
+ |
|
3 |
+readonly Script_Name="Ramize Ramize-Physave Itself" |
|
4 |
+readonly length_of_Script_Name=$(echo "${#Script_Name}") |
|
5 |
+ |
|
6 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
7 |
+readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
8 |
+ |
|
9 |
+ |
|
10 |
+echo |
|
11 |
+echo |
|
12 |
+perl -E "say '*' x $length_of_Script_Name" |
|
13 |
+echo "$Script_Name" |
|
14 |
+perl -E "say '*' x $length_of_Script_Name" |
|
15 |
+ |
|
16 |
+echo |
|
17 |
+echo |
|
18 |
+ |
|
19 |
+cd "$Follpath____This_Script" |
|
20 |
+ |
|
21 |
+source "Libraries/Installer Library" |
|
22 |
+ |
|
23 |
+cd "$Follpath____This_Script/../Ramize-Physave/Ramize" |
|
24 |
+ |
|
25 |
+#mkdir --parents "$dest" |
|
26 |
+ |
|
27 |
+bash "Ramize" |
|
0 | 28 |
\ No newline at end of file |
1 | 29 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,15 @@ |
1 |
+#! /bin/bash |
|
2 |
+ |
|
3 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
4 |
+readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
5 |
+ |
|
6 |
+cd "$Follpath____This_Script" |
|
7 |
+ |
|
8 |
+source "Libraries/Installer Library" |
|
9 |
+ |
|
10 |
+ |
|
11 |
+bash "Ramize Ramize-Physave Itself" |
|
12 |
+ |
|
13 |
+bash "$dest_Installers/Declare This Ramize-Physave In Use" |
|
14 |
+bash "$dest_Installers/Declare This Minimal Ramize-Physave In Use" |
|
15 |
+ |