Added i2c-amp-control service
This commit is contained in:
25
install.sh
Normal file
25
install.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "#{0:0:1}" = "/" ]; then
|
||||
spath=$0
|
||||
else
|
||||
spath=$PWD/$(dirname "$0")
|
||||
fi
|
||||
|
||||
execute_script()
|
||||
{
|
||||
SERVICE=$1
|
||||
|
||||
read -p "Install service $SERVICE? (yes/NO): " xcute
|
||||
xcute="${xcute,,}" # To lowercase
|
||||
if [[ "$xcute" = "y" || "$xcute" = "yes" ]]; then
|
||||
echo "------------------------------------ Installing $SERVICE ------------------------------------"
|
||||
cd "$spath/$SERVICE" || return
|
||||
. ./install.sh
|
||||
echo "------------------------------------ $SERVICE installed ------------------------------------"
|
||||
else
|
||||
echo "Skipping installation of $SERVICE"
|
||||
fi
|
||||
}
|
||||
|
||||
execute_script i2c-amp-control
|
||||
Reference in New Issue
Block a user