-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.cfg
More file actions
35 lines (29 loc) · 1.14 KB
/
Example.cfg
File metadata and controls
35 lines (29 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#Basi Config File
# Config file rules:
# The first line must equal "#Basi Config File"
# Comments are allowed.
# The size of both BasiPath and BasiLoc must be equal. (${#var[@]})
# The size of BasiFileAction must not exceed the lenth of neither BasiPath nor BasiLoc
BasiPath=( # this is the path to reterive the file from.
"remote%https://www.example.com/files/xxx.txt"
"remote%https://www.example.com/files/xxy.txt"
"local%$USER/Desktop/xxb.zip"
"local%/dev/xxc.txt"
)
BasiLoc=( # Where to place file.
"$workdir/xxx.txt"
"$workdir/xxy.txt"
"/tmp/thefilepath/xxb.zip"
"/tmp/thefilepath/xxc.txt"
)
# When working on FileActions some variables are set.
# These vars are BasiDir, BasiActiveFile, and BasiActiveFileDir.
# BasiDir is the dir Basi is being executed in(If standalone this points to Basi.sh).
# BasiActiveFile is the file that last was transferred.
# BasiActiveFileDir is the dir of the last transferred file.
BasiFileAction=( # Execute commands on files before moving on to the next file.
'if [[ "$(wc < )" -gt "5" ]];then head -5 "$BasiActiveFile" > "$BasiActiveFileDir/Five.txt" ;fi'
''
'unzip -q "$BasiActiveFile" -d "$BasiActiveFileDir"'
''
)