function w9y_detect() {
path="$LOCATION"
OLDIFS=$IFS
IFS='/'
set -- $path
IFS=$OLDIFS
for x; do
[[ -d $HOME/.w9y/$x ]] && continue
/w9y mod apply -v "$x" && mkdir -p $HOME/.w9y/$x
[[ $? -eq 0 ]] || continue
if [[ $x = picoclaw ]]; then
echo "[INFO] picoclaw successfully installed, type 'picoclaw' to get started"
fi
if [[ $x = crush ]]; then
echo "[INFO] crush successfully installed, type 'crush' to get started"
fi
done
}
function ensure_home() {
[[ -d $HOME ]] || mkdir -p $HOME
}
ensure_home
cd $HOME
w9y_detect