... | ... |
@@ -1,4 +1,4 @@ |
1 |
-#!/bin/sh |
|
1 |
+#!/bin/bash |
|
2 | 2 |
|
3 | 3 |
# Apollia's note, 20:38:40 02/22/2017: |
4 | 4 |
# |
... | ... |
@@ -14,8 +14,26 @@ |
14 | 14 |
# |
15 | 15 |
# http://www.wizards-toolkit.org/discourse-server/viewtopic.php?t=17529#p65948 |
16 | 16 |
|
17 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
18 |
+ readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
17 | 19 |
|
18 |
-IMAGES_FOLDER="/root/00-BackupWorkspace/vue/*" |
|
20 |
+ |
|
21 |
+Follpath____Images="/root/00-BackupWorkspace/vue" |
|
22 |
+ |
|
23 |
+ |
|
24 |
+#!!!! |
|
25 |
+[ ! -d "$Follpath____Images" ] && { echo "Aborting, since \$Follpath____Images doesn't lead to a folder: |
|
26 |
+ |
|
27 |
+ $Follpath____Images"; |
|
28 |
+ |
|
29 |
+ |
|
30 |
+ #!!!! |
|
31 |
+ exit 1; |
|
32 |
+ } |
|
33 |
+ |
|
34 |
+ |
|
35 |
+ |
|
36 |
+IMAGES_FOLDER="$Follpath____Images/*" |
|
19 | 37 |
|
20 | 38 |
for file in $IMAGES_FOLDER |
21 | 39 |
do |
... | ... |
@@ -34,3 +52,4 @@ do |
34 | 52 |
|
35 | 53 |
rm "$alphafile" |
36 | 54 |
done |
55 |
+ |
... | ... |
@@ -1,4 +1,4 @@ |
1 |
-#!/bin/sh |
|
1 |
+#!/bin/bash |
|
2 | 2 |
|
3 | 3 |
# Apollia's note, 19:45:44 02/22/2017: |
4 | 4 |
# |
... | ... |
@@ -15,7 +15,26 @@ |
15 | 15 |
# http://www.wizards-toolkit.org/discourse-server/viewtopic.php?t=17529#p65948 |
16 | 16 |
|
17 | 17 |
|
18 |
-IMAGES_FOLDER="/root/00-BackupWorkspace/vue/*" |
|
18 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
19 |
+ readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
20 |
+ |
|
21 |
+ |
|
22 |
+Follpath____Images="/root/00-BackupWorkspace/vue" |
|
23 |
+ |
|
24 |
+ |
|
25 |
+#!!!! |
|
26 |
+[ ! -d "$Follpath____Images" ] && { echo "Aborting, since \$Follpath____Images doesn't lead to a folder: |
|
27 |
+ |
|
28 |
+ $Follpath____Images"; |
|
29 |
+ |
|
30 |
+ |
|
31 |
+ #!!!! |
|
32 |
+ exit 1; |
|
33 |
+ } |
|
34 |
+ |
|
35 |
+ |
|
36 |
+ |
|
37 |
+IMAGES_FOLDER="$Follpath____Images/*" |
|
19 | 38 |
|
20 | 39 |
for file in $IMAGES_FOLDER |
21 | 40 |
do |
... | ... |
@@ -1,4 +1,4 @@ |
1 |
-#!/bin/sh |
|
1 |
+#!/bin/bash |
|
2 | 2 |
|
3 | 3 |
# Apollia's note, 19:46:21 02/22/2017. |
4 | 4 |
# |
... | ... |
@@ -8,7 +8,26 @@ |
8 | 8 |
# Makes every image in $IMAGES_FOLDER greyscale. |
9 | 9 |
|
10 | 10 |
|
11 |
-IMAGES_FOLDER="/root/00-BackupWorkspace/vue/*" |
|
11 |
+readonly Fillepath____This_Script=$(realpath "${BASH_SOURCE[0]}") |
|
12 |
+ readonly Follpath____This_Script=$(dirname "$Fillepath____This_Script") |
|
13 |
+ |
|
14 |
+ |
|
15 |
+Follpath____Images="/root/00-BackupWorkspace/vue" |
|
16 |
+ |
|
17 |
+ |
|
18 |
+#!!!! |
|
19 |
+[ ! -d "$Follpath____Images" ] && { echo "Aborting, since \$Follpath____Images doesn't lead to a folder: |
|
20 |
+ |
|
21 |
+ $Follpath____Images"; |
|
22 |
+ |
|
23 |
+ |
|
24 |
+ #!!!! |
|
25 |
+ exit 1; |
|
26 |
+ } |
|
27 |
+ |
|
28 |
+ |
|
29 |
+ |
|
30 |
+IMAGES_FOLDER="$Follpath____Images/*" |
|
12 | 31 |
|
13 | 32 |
for file in $IMAGES_FOLDER |
14 | 33 |
do |