mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 18:51:23 +00:00
devenv
This commit is contained in:
parent
094802b275
commit
29a56f36d8
2 changed files with 8 additions and 5 deletions
|
@ -21,7 +21,6 @@ hassio_role: manager
|
||||||
homeassistant_api: true
|
homeassistant_api: true
|
||||||
privileged:
|
privileged:
|
||||||
- SYS_ADMIN
|
- SYS_ADMIN
|
||||||
full_access: true
|
|
||||||
map:
|
map:
|
||||||
- backup:rw
|
- backup:rw
|
||||||
- data:rw
|
- data:rw
|
||||||
|
|
|
@ -43,9 +43,8 @@ run() {
|
||||||
setup_clean_view() {
|
setup_clean_view() {
|
||||||
# Links some common directories to the user's home folder for convenience
|
# Links some common directories to the user's home folder for convenience
|
||||||
for dir in "${DIRECTORIES[@]}"; do
|
for dir in "${DIRECTORIES[@]}"; do
|
||||||
if [ -e /"${dir}" ]; then
|
current="${CODE_SERVER_WORKSPACE_DIR}"/"${dir}"
|
||||||
current="${CODE_SERVER_WORKSPACE_DIR}"/"${dir}"
|
if [ -e /"${dir}" ]; then
|
||||||
|
|
||||||
if [ ! -e "${current}" ]; then
|
if [ ! -e "${current}" ]; then
|
||||||
bashio::log.warning "Creating link for: ${dir}..."
|
bashio::log.warning "Creating link for: ${dir}..."
|
||||||
ln -sn "/${dir}" "$current" ||
|
ln -sn "/${dir}" "$current" ||
|
||||||
|
@ -59,7 +58,12 @@ setup_clean_view() {
|
||||||
bashio::log.info "${dir} has good link."
|
bashio::log.info "${dir} has good link."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
bashio::log.warning "${dir} does not exist, cannot link..."
|
if [ -e "${current}" ]; then
|
||||||
|
rm "${current}"
|
||||||
|
bashio::log.warning "${dir} does not exist, cannot link, removed existing link..."
|
||||||
|
else
|
||||||
|
bashio::log.warning "${dir} does not exist, cannot link..."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue