Lines Matching refs:loc
30 read loc junk
31 if [[ "$loc" == "" ]]; then loc="/opt/DTT"; fi
33 (( DEBUG )) && print "DEBUG: loc $loc"
36 if print "$loc" | grep '^[./]*$' > /dev/null; then
37 print "ERROR1: Location \"$loc\" is ambiguous.\n."
45 if print "$loc" | grep '[^a-zA-Z0-9_.-/]' > /dev/null; then
46 print "ERROR2: Sorry, location \"$loc\" contains bad characters.\n."
54 basename=${loc%/*}
55 nodename=${loc##*/}
87 if [[ -d "$loc" ]]; then
89 print "\tThis will DELETE the files in $loc, then install the toolkit."
91 if [[ ! -f "$loc/Version" ]]; then
92 print "\nWARNING: $loc doesn't look like an old DTraceToolkit!"
95 print -n "\nContinue (will run \"rm -rf $loc\"). Are you sure (y/N)?: "
102 rm -rf "$loc"
104 print COMMAND: rm -rf \"$loc\"
109 print "\nMaking directory \"$loc\"...\n"
111 mkdir -p "$loc"
113 print COMMAND: mkdir -p \"$loc\"
115 if [[ ! -d "$loc" || ! -w "$loc" ]]; then
116 print "ERROR6: Creation of \"$loc\" failed.\n."
126 tar cf - . | (cd "$loc"; tar xvf -)
128 print COMMAND: "tar cf - . | (cd \"$loc\"; tar xvf -)"
131 if [[ ! -f "$loc/install" ]]; then error=1; fi
135 print ".\tCheck source \"$dir\" and destination \"$loc\", then"
143 rm "$loc/install"
145 print COMMAND: rm \"$loc/install\"
150 print "Installed to \"$loc\". See $loc/Guide for how to get started.\n"