Work on cdc.js

This commit is contained in:
Jonathan Hodgson 2017-09-15 16:15:18 +01:00
parent 25ad20f098
commit da5c5882d8
2 changed files with 223 additions and 2 deletions

View file

@ -10,7 +10,7 @@ function my_dir(){
magentoSiteIcon=" "
dropboxIcon=""
seperator="  "
root=""
root="$seperator"
# Gets the path.
local current_path="$(print -P "%~")"
@ -34,7 +34,7 @@ function my_dir(){
# Change wp-content in sub folders
current_path=$(echo $current_path | sed -r -e "s/wp\-content\//wpc\//")
elif [[ -d "$ph/pub/opt/magento" ]]; then #If magento
elif [[ -e "$ph/bin/magento" ]]; then #If magento
icon=$magentoSiteIcon
fi
current_path=$(echo $current_path | sed -r -e "s/$homeIcon\/Sites\/([a-z_\-]*)\/public_html/$icon\1.local/")
@ -51,6 +51,9 @@ function my_dir(){
# Set the seperator
current_path=$(echo $current_path | sed -r -e "s/\//$seperator/g")
# If seperator is at the end, remove it (this should only be the case if in root directory)
current_path=$(echo $current_path | sed -r -e "s/$seperator\$//g")
echo $current_path
}