mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-14 17:44:45 +00:00
You can find the entire repo here.
This commit is contained in:
23
config/shell_scripts/script_notations.sh
Executable file
23
config/shell_scripts/script_notations.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# this script uses hard-coded paths
|
||||
# This deletes the readme file and begins rebuilding it..
|
||||
|
||||
cat /home/hass/.homeassistant/script/header.md > /home/hass/.homeassistant/script/README.md
|
||||
|
||||
grep -e '^[a-z]' /home/hass/.homeassistant/script/*.yaml | tr : '\n' > /tmp/scriptnames.txt
|
||||
|
||||
sed -i '/^$/d' /tmp/scriptnames.txt
|
||||
|
||||
|
||||
for item in `cat /tmp/scriptnames.txt`
|
||||
do
|
||||
|
||||
res=`grep -R script.$item /home/hass/.homeassistant/. --include=*.yaml`
|
||||
echo "\n $item \n" | sed 's|/home/hass/\.homeassistant/| https://github\.com/CCOSTAN/Home-AssistantConfig/blob/master/|g'>> /home/hass/.homeassistant/script/README.md
|
||||
echo "\n $res \n" | sed 's|/home/hass/\.homeassistant/\.| https://github\.com/CCOSTAN/Home-AssistantConfig/blob/master|g' >> /home/hass/.homeassistant/script/README.md
|
||||
|
||||
sed -i '/^$/d' /home/hass/.homeassistant/script/README.md
|
||||
|
||||
done
|
||||
cat /home/hass/.homeassistant/script/README.md
|
Reference in New Issue
Block a user