Skip to content

Commit

Permalink
Create custom_components directory if it does not exist (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Jul 31, 2024
1 parent 3a1a504 commit 60f6544
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions get/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.2.1

- Create custom_components directory if it does not exist

# 1.2.0

- Set dev version to 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion get/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Get HACS
version: "1.2.0"
version: "1.2.1"
slug: get
image: "ghcr.io/hacs/{arch}-addon-get"
description: The easiest way to get HACS for Home Assistant
Expand Down
5 changes: 4 additions & 1 deletion get/rootfs/etc/addon/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ bashio::log.info "Starting HACS download..."
bashio::log.info "Channel: ${CHANNEL}"
bashio::log.info "------------------------------------"

if ! bashio::fs.directory_exists "/homeassistant/custom_components"; then
bashio::log.info "Looks like HACS is your first custom integration, nice!"
mkdir /homeassistant/custom_components
fi

if bashio::var.equals "${CHANNEL}" "current"; then
wget -O ./get-hacs https://raw.githubusercontent.com/hacs/get/main/get
Expand Down Expand Up @@ -44,5 +48,4 @@ elif bashio::var.equals "${CHANNEL}" "development"; then

else
bashio::exit.nok "Invalid channel!"

fi

0 comments on commit 60f6544

Please sign in to comment.