-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsrcall.sh
More file actions
executable file
·56 lines (40 loc) · 796 Bytes
/
srcall.sh
File metadata and controls
executable file
·56 lines (40 loc) · 796 Bytes
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# File: srcall.sh
# Created: 1703 100813
# Description: description for srcall.sh
#
### FUNCTIONS ###
srcget()
{
typeset srcget="$srcgetDir/srcget.sh"
[ ! -f "$srcget" ] && return 1
[ ! -x "$srcget" ] && return 2
$srcget $*
}
### ENV ###
srcgetDir="$(dirname $0)"
### MAIN ###
[ ! -d "$srcgetDir/profiles" ] &&
{
echo "Can't find profiles directory!: $srcgetDir/profiles"
exit 2
}
for x in $srcgetDir/profiles/*/*.profile; do
[ ! -s "$x" ] && continue
b=$(basename $x)
p=${b%.profile}
basename=""
. "$x"
b="$basename"
[ -z "$b" ] && b="$p"
# printf "Checking ${p}..."
srcget -n $p
rc="$?"
# 2 = file already exiests
[ $rc -eq 2 -o $rc -eq 0 ] && {
continue
}
echo "${p}: error: $rc"
done
### EOF ###