-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cache_src
More file actions
executable file
·85 lines (82 loc) · 2.15 KB
/
.cache_src
File metadata and controls
executable file
·85 lines (82 loc) · 2.15 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# I can't get no Studio (Satisfaction) - Cache' "compiler"
# Sussudio - Cache' "compiler"
# Usage:
# susudio <options> <files>
# where
# <files> is a ":" delimited list of Cache'e xml export files
# to process.
# If files is empty, then we will recursivly
# spin from current working directory, looking
# for all *.cls.xml, *.mac.xml
# <options>
# -cachehome Path to Cache' install, e.g. /usr/var/cache
# (root of install, not mgr)
# Default: environment var SUSSUDIO.CACHEHOME
#
# -ns Namespace to load code into
# Default: env var SUSSUDIO.NS
# -
cache_home={$SUSSUDIO_CACHEHOME}
ns={$SUSSUSIO_NS}
cache_src_file=$cache_home/mgr/$ns/.cachesrc_load
file_count=0
# parse command line options
for i in $*
do
echo "i=$i"
case $i in
-ch=*|--cachehome=*)
cache_home=`echo $i | sed 's/[-a-zA-Z0-9]*=//'`
;;
-ns=*|--namespace=*)
ns=`echo $i | sed 's/[-a-zA-Z0-9]*=//'`
;;
*)
# unknown option, assume it's imput files.
FILES[${#FILES[@]}]=$i
;;
esac
done
echo cache_home = ${cache_home}
echo ns = ${ns}
echo {$FILES}
if [ ${#FILES[@]} -eq 0 ]
then
SPIN=1
else
SPIN=0
fi
# green=32m, red=31m, cyan=36m, yellow=33m
echo -e "\033[32mRemoving previous $cache_src_file"
echo -e "\033[0m"
rm $cache_src_file
if [ $SPIN -eq 0 ]
then
echo "Searching for files in current directory"
for file in $( find `pwd` -name *.cls.xml )
do
echo -e "\033[33mAdding: $file"
echo -e "\033[0m"
echo "$file" >> $cache_src_file
done
for file in $( find `pwd` -name *.mac.xml )
do
echo -e "\033[33mAdding: $file"
echo -e "\033[0m"
echo "$file" >> $cache_src_file
done
else
for i in "${FILES[@]}"
do
echo -e "\033[33mAdding: $i"
echo -e "\033[0m"
echo "$i" >> $cache_src_file
done
fi
echo -e "\033[32mLoading following files:"
cat $cache_src_file
echo -e "\033[0m"
echo "Calling Cache', Is anyone out there?"
echo -e "\033[36m"
$cache_home/bin/ccontrol session HS -U $ns "^cachesrc"
echo -e "\033[0m"