Commit 177b637
committed
install: use EXIT trap for temp directory cleanup
Replace scattered rm -rf calls with a single EXIT trap to ensure the
temp directory is always cleaned up on exit. Previously, failures in
curl/wget download, tar extraction, chmod, or mkdir left temp files
behind because set -e would exit before reaching manual cleanup calls.
The trap fires on any exit (success or failure), so it covers all
paths with one line while removing five redundant cleanup calls.1 parent b175fd8 commit 177b637
1 file changed
+1
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
123 | | - | |
124 | 121 | | |
125 | 122 | | |
126 | 123 | | |
| |||
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
147 | | - | |
148 | 144 | | |
149 | 145 | | |
150 | 146 | | |
| |||
0 commit comments