Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
🔨 Simplifies add-on code logic
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck committed Apr 14, 2019
1 parent 9b971c2 commit 00960fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
16 changes: 0 additions & 16 deletions adb/rootfs/etc/cont-init.d/20-config.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: Android Debug Bridge
# This files check if all user configuration requirements are met
# Configures ADB
# ==============================================================================
declare path

if bashio::config.has_value 'keys_path' \
&& ! bashio::fs.directory_exists "$(bashio::config 'keys_path')";
then
Expand All @@ -26,3 +28,13 @@ if ! bashio::config.has_value 'devices'; then
bashio::log.warning 'The add-on might not work as expected.'
bashio::log.warning
fi

# Default storage keys path storage location
path="/data"

# If the user specified a custom keys path, use that.
if bashio::config.has_value 'keys_path'; then
path="$(bashio::config 'keys_path')"
fi

ln -sf "${path}" /root/.android

0 comments on commit 00960fa

Please sign in to comment.