Move remaining code out of bin
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 7 Sep 2018 00:45:22 +0000 (20:45 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sun, 9 Sep 2018 01:48:45 +0000 (21:48 -0400)
and reserve it for built files from now on

21 files changed:
.gitignore
Makefile
src/bash/exe/khatus.sh [moved from bin/khatus with 100% similarity, mode: 0644]
src/bash/exe/khatus_gen_bar_make_status.sh [moved from bin/khatus_gen_bar_make_status with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_bluetooth_power.sh [moved from bin/khatus_sensor_bluetooth_power with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_datetime.sh [moved from bin/khatus_sensor_datetime with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_devices.sh [moved from bin/khatus_sensor_devices with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_disk_io.sh [moved from bin/khatus_sensor_disk_io with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_disk_space.sh [moved from bin/khatus_sensor_disk_space with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_energy.sh [moved from bin/khatus_sensor_energy with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_fan.sh [moved from bin/khatus_sensor_fan with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_loadavg.sh [moved from bin/khatus_sensor_loadavg with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_memory.sh [moved from bin/khatus_sensor_memory with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_mpd.sh [moved from bin/khatus_sensor_mpd with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_net_addr_io.sh [moved from bin/khatus_sensor_net_addr_io with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_net_wifi_status.sh [moved from bin/khatus_sensor_net_wifi_status with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_procs.sh [moved from bin/khatus_sensor_procs with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_screen_brightness.sh [moved from bin/khatus_sensor_screen_brightness with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_temperature.sh [moved from bin/khatus_sensor_temperature with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_volume.sh [moved from bin/khatus_sensor_volume with 100% similarity, mode: 0644]
src/bash/exe/khatus_sensor_weather.sh [moved from bin/khatus_sensor_weather with 100% similarity, mode: 0644]

index 7d4b4de..271527f 100644 (file)
@@ -1,24 +1,3 @@
 _build/
-bin/khatus_actuate_alert_to_notify_send
-bin/khatus_actuate_device_add_to_automount
-bin/khatus_actuate_status_bar_to_xsetroot_name
-bin/khatus_bar
-bin/khatus_dashboard
-bin/khatus_monitor_devices
-bin/khatus_monitor_energy
-bin/khatus_monitor_errors
-bin/khatus_parse_bluetoothctl_show
-bin/khatus_parse_df_pcent
-bin/khatus_parse_fan_file
-bin/khatus_parse_free
-bin/khatus_parse_ip_addr
-bin/khatus_parse_iwconfig
-bin/khatus_parse_loadavg_file
-bin/khatus_parse_metar_d_output
-bin/khatus_parse_mpd_status_currentsong
-bin/khatus_parse_pactl_list_sinks
-bin/khatus_parse_ps
-bin/khatus_parse_sys_block_stat
-bin/khatus_parse_udevadm_monitor_block
-bin/khatus_parse_upower
+bin/
 data/
index 54353de..b9ecf04 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+MAKEFLAGS := --no-builtin-rules
+
 PREFIX := $(HOME)
 PATH_TO_AWK := /usr/bin/awk
 AWK_EXECUTABLES := \
@@ -22,8 +24,30 @@ AWK_EXECUTABLES := \
        bin/khatus_parse_sys_block_stat \
        bin/khatus_parse_udevadm_monitor_block \
        bin/khatus_parse_upower
+BASH_EXECUTABLE_NAMES := \
+       khatus \
+       khatus_gen_bar_make_status \
+       khatus_sensor_bluetooth_power \
+       khatus_sensor_datetime \
+       khatus_sensor_devices \
+       khatus_sensor_disk_io \
+       khatus_sensor_disk_space \
+       khatus_sensor_energy \
+       khatus_sensor_fan \
+       khatus_sensor_loadavg \
+       khatus_sensor_memory \
+       khatus_sensor_mpd \
+       khatus_sensor_net_addr_io \
+       khatus_sensor_net_wifi_status \
+       khatus_sensor_procs \
+       khatus_sensor_screen_brightness \
+       khatus_sensor_temperature \
+       khatus_sensor_volume \
+       khatus_sensor_weather
+BASH_EXECUTABLES := $(foreach exe,$(BASH_EXECUTABLE_NAMES),bin/$(exe))
 OCAML_EXECUTABLES := \
-       bin/khatus_dashboard
+       bin/khatus_cache_dumper
+EXECUTABLES := $(AWK_EXECUTABLES) $(BASH_EXECUTABLES) $(OCAML_EXECUTABLES)
 
 define BUILD_AWK_EXE
        echo '#! $(PATH_TO_AWK) -f'                                > $@ && \
@@ -33,19 +57,37 @@ define BUILD_AWK_EXE
        chmod +x $@
 endef
 
+define BUILD_BASH_EXE
+       cat $^ > $@ && \
+       chmod +x $@
+endef
+
+define GEN_BASH_EXE_RULE
+bin/$(1) : src/bash/exe/$(1).sh
+       $$(BUILD_BASH_EXE)
+endef
+
 .PHONY: \
        build \
        install \
        clean
 
-build: $(AWK_EXECUTABLES) $(OCAML_EXECUTABLES)
+build: | bin
+build: $(EXECUTABLES)
 
 install:
        $(foreach filename,$(wildcard bin/*),cp -p "$(filename)" "$(PREFIX)/$(filename)"; )
 
 clean:
-       rm -f $(AWK_EXECUTABLES)
-       rm -f $(OCAML_EXECUTABLES)
+       rm -rf bin
+
+bin:
+       mkdir -p bin
+
+#-----------------------------------------------------------------------------
+# Bash
+#-----------------------------------------------------------------------------
+$(foreach exe,$(BASH_EXECUTABLE_NAMES),$(eval $(call GEN_BASH_EXE_RULE,$(exe))))
 
 #-----------------------------------------------------------------------------
 # AWK
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus
rename to src/bash/exe/khatus.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_gen_bar_make_status
rename to src/bash/exe/khatus_gen_bar_make_status.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_bluetooth_power
rename to src/bash/exe/khatus_sensor_bluetooth_power.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_datetime
rename to src/bash/exe/khatus_sensor_datetime.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_devices
rename to src/bash/exe/khatus_sensor_devices.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_disk_io
rename to src/bash/exe/khatus_sensor_disk_io.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_disk_space
rename to src/bash/exe/khatus_sensor_disk_space.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_energy
rename to src/bash/exe/khatus_sensor_energy.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_fan
rename to src/bash/exe/khatus_sensor_fan.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_loadavg
rename to src/bash/exe/khatus_sensor_loadavg.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_memory
rename to src/bash/exe/khatus_sensor_memory.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_mpd
rename to src/bash/exe/khatus_sensor_mpd.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_net_addr_io
rename to src/bash/exe/khatus_sensor_net_addr_io.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_net_wifi_status
rename to src/bash/exe/khatus_sensor_net_wifi_status.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_procs
rename to src/bash/exe/khatus_sensor_procs.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_screen_brightness
rename to src/bash/exe/khatus_sensor_screen_brightness.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_temperature
rename to src/bash/exe/khatus_sensor_temperature.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_volume
rename to src/bash/exe/khatus_sensor_volume.sh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from bin/khatus_sensor_weather
rename to src/bash/exe/khatus_sensor_weather.sh
This page took 0.053778 seconds and 4 git commands to generate.