mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 02:31:34 +00:00
devenv
This commit is contained in:
parent
f9472e950f
commit
0da52ef02c
1 changed files with 10 additions and 3 deletions
|
@ -43,9 +43,16 @@ run() {
|
|||
setup_clean_view() {
|
||||
# Links some common directories to the user's home folder for convenience
|
||||
for dir in "${DIRECTORIES[@]}"; do
|
||||
if [[ ! -d "${CODE_SERVER_WORKSPACE_DIR}"/"${dir}" ]]; then
|
||||
ln -sn "/${dir}" "${CODE_SERVER_WORKSPACE_DIR}"/"${dir}" ||
|
||||
bashio::log.warning "Failed linking common directory: ${dir}"
|
||||
current="${CODE_SERVER_WORKSPACE_DIR}"/"${dir}"
|
||||
if [ -L "${current}" ] && [ -e "${current}" ]; then
|
||||
bashio::log.info "${dir} has good link"
|
||||
elif [ ! -e "${current}" ]; then
|
||||
rm -f "${current}"
|
||||
ln -sn "/${dir}" "$current" ||
|
||||
bashio::log.warning "Failed linking common directory: ${dir}"
|
||||
else
|
||||
ln -sn "/${dir}" "$current" ||
|
||||
bashio::log.warning "Failed linking common directory: ${dir}"
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue