better devmode
This commit is contained in:
+12
-1
@@ -29,7 +29,17 @@ function dev_mode {
|
||||
}
|
||||
|
||||
function assert_reachable_target {
|
||||
sudo -u nobody -g sudo test -x "$(dirname "$target")"
|
||||
local parent_target
|
||||
parent_target=$(dirname "$target")
|
||||
if ! sudo -u nobody -g sudo test -x "$parent_target"; then
|
||||
cat >&2 <<EOF
|
||||
MIAOU ERROR: development mode unreachable for folder: $parent_target
|
||||
quick fix:
|
||||
sudo chgrp sudo $parent_target
|
||||
sudo chmod g+rx $parent_target
|
||||
EOF
|
||||
return 20
|
||||
fi
|
||||
}
|
||||
|
||||
function assert_devmode_available {
|
||||
@@ -55,6 +65,7 @@ function fetch_target {
|
||||
name=$(echo "$GIT_URL" | cut -d/ -f2)
|
||||
name="${name%.git}"
|
||||
target="$PWD/$name"
|
||||
echo "development mode target: $target"
|
||||
}
|
||||
|
||||
# Main
|
||||
|
||||
Reference in New Issue
Block a user