Initial smarthome collection setup
This commit is contained in:
parent
15f848ad32
commit
8a5e3a647b
30
.gitmodules
vendored
Normal file
30
.gitmodules
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[submodule "ambient_info"]
|
||||||
|
path = ambient_info
|
||||||
|
url = https://git.mount-mockery.de/smarthome/ambient_info.git
|
||||||
|
[submodule "bt-audio"]
|
||||||
|
path = bt-audio
|
||||||
|
url = https://git.mount-mockery.de/smarthome/bt-audio.git
|
||||||
|
[submodule "home_emulation"]
|
||||||
|
path = home_emulation
|
||||||
|
url = https://git.mount-mockery.de/smarthome/home_emulation.git
|
||||||
|
[submodule "leyk"]
|
||||||
|
path = leyk
|
||||||
|
url = https://git.mount-mockery.de/smarthome/leyk.git
|
||||||
|
[submodule "mpd"]
|
||||||
|
path = mpd
|
||||||
|
url = https://git.mount-mockery.de/smarthome/mpd.git
|
||||||
|
[submodule "powerplug-energenie"]
|
||||||
|
path = powerplug-energenie
|
||||||
|
url = https://git.mount-mockery.de/smarthome/powerplug-energenie.git
|
||||||
|
[submodule "remote_control"]
|
||||||
|
path = remote_control
|
||||||
|
url = https://git.mount-mockery.de/smarthome/remote_control.git
|
||||||
|
[submodule "smart_brain"]
|
||||||
|
path = smart_brain
|
||||||
|
url = https://git.mount-mockery.de/smarthome/smart_brain.git
|
||||||
|
[submodule "smart_brain_test"]
|
||||||
|
path = smart_brain_test
|
||||||
|
url = https://git.mount-mockery.de/smarthome/smart_brain_test.git
|
||||||
|
[submodule "spotify"]
|
||||||
|
path = spotify
|
||||||
|
url = https://git.mount-mockery.de/smarthome/spotify.git
|
103
Makefile
Normal file
103
Makefile
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
# git helper Makefile: Version 2.2 (2025-08-10)
|
||||||
|
default: help
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
SHELL = /usr/bin/bash
|
||||||
|
MAKEFLAGS += --no-print-directory
|
||||||
|
.SILENT:
|
||||||
|
|
||||||
|
-include __make.d__/*.mk
|
||||||
|
|
||||||
|
GIT_FLAG = ./.git
|
||||||
|
VENV_FLAG = ./.venv_required
|
||||||
|
VENV_FOLDER = ./venv
|
||||||
|
|
||||||
|
localhelp:
|
||||||
|
|
||||||
|
help:
|
||||||
|
echo "Possible common options are:"
|
||||||
|
echo " - init - Initialise the repository and all folders below with a Makefile"
|
||||||
|
echo " - giti - Get the git status of all submodules including their submodules"
|
||||||
|
echo " - update_submodules - Set all submodules to remote master"
|
||||||
|
echo " - venv_flag - Set the venev flag for the base folder. A venv will be generated"
|
||||||
|
echo " - clean - clean up"
|
||||||
|
echo " - deepclean - clean up this and all Makefiles below"
|
||||||
|
$(MAKE) localhelp
|
||||||
|
echo "You are able to create files make.d/*.mk and add local rules there. "
|
||||||
|
echo " - localinit: print_head - Will be executed as last step in the init process."
|
||||||
|
echo " - localhelp: print_head - Will be executed in th middle of the help text generation"
|
||||||
|
echo " - localclean:print_head - Will be executed before the clean rule"
|
||||||
|
|
||||||
|
localinit:
|
||||||
|
|
||||||
|
init: print_head
|
||||||
|
# Init git repo
|
||||||
|
if [[ -e $(GIT_FLAG) ]]; then
|
||||||
|
echo -e "\033[1;33mInitialising git submodules...\e[0m"
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
fi
|
||||||
|
# Init submodules
|
||||||
|
SUBDIRS=$$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort)
|
||||||
|
for subdir in $$SUBDIRS; do
|
||||||
|
$(MAKE) --no-print-directory -C $$(dirname $$subdir) init
|
||||||
|
done
|
||||||
|
if [[ $$SUBDIRS ]]; then
|
||||||
|
$(MAKE) print_head
|
||||||
|
fi
|
||||||
|
# Create venv if needed
|
||||||
|
if [[ -e $(VENV_FLAG) ]]; then
|
||||||
|
if [[ ! -e $(VENV_FOLDER) ]]; then
|
||||||
|
echo -e "\033[1;33mCreating virtual env...\e[0m"
|
||||||
|
mkvenv
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Start local init
|
||||||
|
echo -e "\033[1;33mDoing localinit...\e[0m"
|
||||||
|
$(MAKE) localinit
|
||||||
|
|
||||||
|
update_submodules:
|
||||||
|
git submodule foreach "git fetch && git checkout master && git pull && git submodule init && git submodule update"
|
||||||
|
|
||||||
|
giti_this: print_head
|
||||||
|
giti
|
||||||
|
echo " Submodules:"
|
||||||
|
git submodule --quiet foreach "echo -n ' ' && giti"
|
||||||
|
|
||||||
|
giti:
|
||||||
|
git submodule --quiet foreach "[ -e Makefile ] && make --no-print-directory giti_this || :"
|
||||||
|
|
||||||
|
localclean:
|
||||||
|
|
||||||
|
clean: localclean
|
||||||
|
if [[ ! -e $(VENV_FLAG) ]]; then
|
||||||
|
if [[ -d $(VENV_FOLDER) ]]; then
|
||||||
|
rm -rf $(VENV_FOLDER)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
cleanall: clean
|
||||||
|
for subdir in $$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort); do
|
||||||
|
$(MAKE) --no-print-directory -C $$(dirname $$subdir) cleanall
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
venv_flag:
|
||||||
|
if [[ ! -e $(VENV_FLAG) ]]; then
|
||||||
|
touch $(VENV_FLAG)
|
||||||
|
if [[ -e $(GIT_FLAG) ]]; then
|
||||||
|
git add $(VENV_FLAG)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
print_head:
|
||||||
|
DIRNAME=$$(basename $$(pwd))
|
||||||
|
DIRLENGTH=$${#DIRNAME}
|
||||||
|
echo -ne "\n\n\033[1;34m╔═"
|
||||||
|
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
|
||||||
|
echo -e "═╗"
|
||||||
|
echo -e "║ $$DIRNAME ║"
|
||||||
|
echo -ne "╚═"
|
||||||
|
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
|
||||||
|
echo -e "═╝\033[00m"
|
||||||
|
|
1
ambient_info
Submodule
1
ambient_info
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 2021a0f5bb2fba4d7349a0eba0c41b9880146df5
|
1
bt-audio
Submodule
1
bt-audio
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d8b8b7d9ff4b74c74204b224e6804bf0a36f08c1
|
1
home_emulation
Submodule
1
home_emulation
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 7053173e871c4f3c057935aa6c0c540a0a6861ea
|
1
leyk
Submodule
1
leyk
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit dfc9b8687f5506127b0728098579c0da6cff1a88
|
1
mpd
Submodule
1
mpd
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit f85fbcff40a247a343128b25e1f7494b8baadd14
|
1
powerplug-energenie
Submodule
1
powerplug-energenie
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 6913de74df5e082d98005823d24c39fea61d0e4f
|
1
remote_control
Submodule
1
remote_control
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 04b589ac9034b7f0606b6b3cec043ea3451a9b6f
|
1
smart_brain
Submodule
1
smart_brain
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 23a7f8333d66a922561bc07d9b75ce7297ce35d9
|
1
smart_brain_test
Submodule
1
smart_brain_test
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d538cba7e97a8da315b32f2e60f28eac3373b69b
|
1
spotify
Submodule
1
spotify
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 1cae13a47136d069954ac9255bd3e179d566ede9
|
Loading…
x
Reference in New Issue
Block a user