| ... | ... |
@@ -271,8 +271,11 @@ failed() {
|
| 271 | 271 |
# an error. It is also useful for following along as the install occurs. |
| 272 | 272 |
set -o xtrace |
| 273 | 273 |
|
| 274 |
+# create the destination directory and ensure it is writable by the user |
|
| 274 | 275 |
sudo mkdir -p $DEST |
| 275 |
-sudo chown `whoami` $DEST |
|
| 276 |
+if [ ! -w $DEST ]; then |
|
| 277 |
+ sudo chown `whoami` $DEST |
|
| 278 |
+fi |
|
| 276 | 279 |
|
| 277 | 280 |
# Install Packages |
| 278 | 281 |
# ================ |