From: Siraaj Khandkar Date: Thu, 17 Jan 2019 22:13:56 +0000 (-0500) Subject: Separate v2 and v3 into dedicated directories X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=53d24ad688ea39892dbf3c748c1e40514eeb2763;p=khatus.git Separate v2 and v3 into dedicated directories --- diff --git a/v2/.gitignore b/v2/.gitignore new file mode 100644 index 0000000..e660fd9 --- /dev/null +++ b/v2/.gitignore @@ -0,0 +1 @@ +bin/ diff --git a/Makefile b/v2/Makefile similarity index 90% rename from Makefile rename to v2/Makefile index 873ebeb..c2d3f52 100644 --- a/Makefile +++ b/v2/Makefile @@ -45,9 +45,7 @@ BASH_EXECUTABLE_NAMES := \ khatus_sensor_volume \ khatus_sensor_weather BASH_EXECUTABLES := $(foreach exe,$(BASH_EXECUTABLE_NAMES),bin/$(exe)) -OCAML_EXECUTABLES := \ - bin/khatus_cache_dumper -EXECUTABLES := $(AWK_EXECUTABLES) $(BASH_EXECUTABLES) $(OCAML_EXECUTABLES) +EXECUTABLES := $(AWK_EXECUTABLES) $(BASH_EXECUTABLES) define BUILD_AWK_EXE echo '#! $(PATH_TO_AWK) -f' > $@ && \ @@ -80,7 +78,6 @@ install: clean: rm -rf bin - ocamlbuild -clean bin: mkdir -p bin @@ -212,11 +209,3 @@ bin/khatus_parse_upower: \ src/awk/exe/parse_upower.awk \ src/awk/lib/msg.awk $(BUILD_AWK_EXE) - -#----------------------------------------------------------------------------- -# OCaml -#----------------------------------------------------------------------------- -bin/khatus_cache_dumper: src/ocaml/exe/khatus_cache_dumper.ml - ocamlbuild -cflags '-w A' -pkg unix -I src/ocaml/exe -I src/ocaml/lib khatus_cache_dumper.byte - mv _build/src/ocaml/exe/khatus_cache_dumper.byte bin/khatus_cache_dumper - rm -f khatus_cache_dumper.byte diff --git a/sanity_check b/v2/sanity_check similarity index 94% rename from sanity_check rename to v2/sanity_check index ef95ef6..8131813 100755 --- a/sanity_check +++ b/v2/sanity_check @@ -14,7 +14,6 @@ -v Status_Args='@energy_percent,@memory_percent,@processes_count_all,@processes_count_r,@processes_count_d,@processes_count_t,@processes_count_i,@processes_count_z,@cpu_loadavg,@cpu_temp,@cpu_fan_speed,@disk_space,@disk_io_w,@disk_io_r,@net_wifi:wlp4s0,@net_io_w:wlp4s0,@net_io_r:wlp4s0,@bluetooth_power,@backlight_percent,@volume:0,@mpd,@weather_temp_f,@datetime' \ ) \ ) \ - >(stdbuf -o L ./bin/khatus_cache_dumper $(hostname) 5 "$PWD/data") \ >(stdbuf -o L ./bin/khatus_monitor_energy) \ >(stdbuf -o L ./bin/khatus_monitor_errors) \ >(stdbuf -o L ./bin/khatus_monitor_devices) \ diff --git a/src/awk/exe/actuate_alert_to_notify_send.awk b/v2/src/awk/exe/actuate_alert_to_notify_send.awk similarity index 100% rename from src/awk/exe/actuate_alert_to_notify_send.awk rename to v2/src/awk/exe/actuate_alert_to_notify_send.awk diff --git a/src/awk/exe/actuate_device_add_to_automount.awk b/v2/src/awk/exe/actuate_device_add_to_automount.awk similarity index 100% rename from src/awk/exe/actuate_device_add_to_automount.awk rename to v2/src/awk/exe/actuate_device_add_to_automount.awk diff --git a/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk b/v2/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk similarity index 100% rename from src/awk/exe/actuate_status_bar_to_xsetroot_name.awk rename to v2/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk diff --git a/src/awk/exe/bar.awk b/v2/src/awk/exe/bar.awk similarity index 100% rename from src/awk/exe/bar.awk rename to v2/src/awk/exe/bar.awk diff --git a/src/awk/exe/gen_bar_make_status.awk b/v2/src/awk/exe/gen_bar_make_status.awk similarity index 100% rename from src/awk/exe/gen_bar_make_status.awk rename to v2/src/awk/exe/gen_bar_make_status.awk diff --git a/src/awk/exe/monitor_devices.awk b/v2/src/awk/exe/monitor_devices.awk similarity index 100% rename from src/awk/exe/monitor_devices.awk rename to v2/src/awk/exe/monitor_devices.awk diff --git a/src/awk/exe/monitor_energy.awk b/v2/src/awk/exe/monitor_energy.awk similarity index 100% rename from src/awk/exe/monitor_energy.awk rename to v2/src/awk/exe/monitor_energy.awk diff --git a/src/awk/exe/monitor_errors.awk b/v2/src/awk/exe/monitor_errors.awk similarity index 100% rename from src/awk/exe/monitor_errors.awk rename to v2/src/awk/exe/monitor_errors.awk diff --git a/src/awk/exe/parse_bluetoothctl_show.awk b/v2/src/awk/exe/parse_bluetoothctl_show.awk similarity index 100% rename from src/awk/exe/parse_bluetoothctl_show.awk rename to v2/src/awk/exe/parse_bluetoothctl_show.awk diff --git a/src/awk/exe/parse_df_pcent.awk b/v2/src/awk/exe/parse_df_pcent.awk similarity index 100% rename from src/awk/exe/parse_df_pcent.awk rename to v2/src/awk/exe/parse_df_pcent.awk diff --git a/src/awk/exe/parse_fan_file.awk b/v2/src/awk/exe/parse_fan_file.awk similarity index 100% rename from src/awk/exe/parse_fan_file.awk rename to v2/src/awk/exe/parse_fan_file.awk diff --git a/src/awk/exe/parse_free.awk b/v2/src/awk/exe/parse_free.awk similarity index 100% rename from src/awk/exe/parse_free.awk rename to v2/src/awk/exe/parse_free.awk diff --git a/src/awk/exe/parse_ip_addr.awk b/v2/src/awk/exe/parse_ip_addr.awk similarity index 100% rename from src/awk/exe/parse_ip_addr.awk rename to v2/src/awk/exe/parse_ip_addr.awk diff --git a/src/awk/exe/parse_iwconfig.awk b/v2/src/awk/exe/parse_iwconfig.awk similarity index 100% rename from src/awk/exe/parse_iwconfig.awk rename to v2/src/awk/exe/parse_iwconfig.awk diff --git a/src/awk/exe/parse_loadavg_file.awk b/v2/src/awk/exe/parse_loadavg_file.awk similarity index 100% rename from src/awk/exe/parse_loadavg_file.awk rename to v2/src/awk/exe/parse_loadavg_file.awk diff --git a/src/awk/exe/parse_metar_d_output.awk b/v2/src/awk/exe/parse_metar_d_output.awk similarity index 100% rename from src/awk/exe/parse_metar_d_output.awk rename to v2/src/awk/exe/parse_metar_d_output.awk diff --git a/src/awk/exe/parse_mpd_status_currentsong.awk b/v2/src/awk/exe/parse_mpd_status_currentsong.awk similarity index 100% rename from src/awk/exe/parse_mpd_status_currentsong.awk rename to v2/src/awk/exe/parse_mpd_status_currentsong.awk diff --git a/src/awk/exe/parse_pactl_list_sinks.awk b/v2/src/awk/exe/parse_pactl_list_sinks.awk similarity index 100% rename from src/awk/exe/parse_pactl_list_sinks.awk rename to v2/src/awk/exe/parse_pactl_list_sinks.awk diff --git a/src/awk/exe/parse_ps.awk b/v2/src/awk/exe/parse_ps.awk similarity index 100% rename from src/awk/exe/parse_ps.awk rename to v2/src/awk/exe/parse_ps.awk diff --git a/src/awk/exe/parse_sys_block_stat.awk b/v2/src/awk/exe/parse_sys_block_stat.awk similarity index 100% rename from src/awk/exe/parse_sys_block_stat.awk rename to v2/src/awk/exe/parse_sys_block_stat.awk diff --git a/src/awk/exe/parse_udevadm_monitor_block.awk b/v2/src/awk/exe/parse_udevadm_monitor_block.awk similarity index 100% rename from src/awk/exe/parse_udevadm_monitor_block.awk rename to v2/src/awk/exe/parse_udevadm_monitor_block.awk diff --git a/src/awk/exe/parse_upower.awk b/v2/src/awk/exe/parse_upower.awk similarity index 100% rename from src/awk/exe/parse_upower.awk rename to v2/src/awk/exe/parse_upower.awk diff --git a/src/awk/lib/cache.awk b/v2/src/awk/lib/cache.awk similarity index 100% rename from src/awk/lib/cache.awk rename to v2/src/awk/lib/cache.awk diff --git a/src/awk/lib/msg.awk b/v2/src/awk/lib/msg.awk similarity index 100% rename from src/awk/lib/msg.awk rename to v2/src/awk/lib/msg.awk diff --git a/src/awk/lib/num.awk b/v2/src/awk/lib/num.awk similarity index 100% rename from src/awk/lib/num.awk rename to v2/src/awk/lib/num.awk diff --git a/src/awk/lib/str.awk b/v2/src/awk/lib/str.awk similarity index 100% rename from src/awk/lib/str.awk rename to v2/src/awk/lib/str.awk diff --git a/src/bash/exe/khatus.sh b/v2/src/bash/exe/khatus.sh similarity index 100% rename from src/bash/exe/khatus.sh rename to v2/src/bash/exe/khatus.sh diff --git a/src/bash/exe/khatus_sensor_bluetooth_power.sh b/v2/src/bash/exe/khatus_sensor_bluetooth_power.sh similarity index 100% rename from src/bash/exe/khatus_sensor_bluetooth_power.sh rename to v2/src/bash/exe/khatus_sensor_bluetooth_power.sh diff --git a/src/bash/exe/khatus_sensor_datetime.sh b/v2/src/bash/exe/khatus_sensor_datetime.sh similarity index 100% rename from src/bash/exe/khatus_sensor_datetime.sh rename to v2/src/bash/exe/khatus_sensor_datetime.sh diff --git a/src/bash/exe/khatus_sensor_devices.sh b/v2/src/bash/exe/khatus_sensor_devices.sh similarity index 100% rename from src/bash/exe/khatus_sensor_devices.sh rename to v2/src/bash/exe/khatus_sensor_devices.sh diff --git a/src/bash/exe/khatus_sensor_disk_io.sh b/v2/src/bash/exe/khatus_sensor_disk_io.sh similarity index 100% rename from src/bash/exe/khatus_sensor_disk_io.sh rename to v2/src/bash/exe/khatus_sensor_disk_io.sh diff --git a/src/bash/exe/khatus_sensor_disk_space.sh b/v2/src/bash/exe/khatus_sensor_disk_space.sh similarity index 100% rename from src/bash/exe/khatus_sensor_disk_space.sh rename to v2/src/bash/exe/khatus_sensor_disk_space.sh diff --git a/src/bash/exe/khatus_sensor_energy.sh b/v2/src/bash/exe/khatus_sensor_energy.sh similarity index 100% rename from src/bash/exe/khatus_sensor_energy.sh rename to v2/src/bash/exe/khatus_sensor_energy.sh diff --git a/src/bash/exe/khatus_sensor_fan.sh b/v2/src/bash/exe/khatus_sensor_fan.sh similarity index 100% rename from src/bash/exe/khatus_sensor_fan.sh rename to v2/src/bash/exe/khatus_sensor_fan.sh diff --git a/src/bash/exe/khatus_sensor_loadavg.sh b/v2/src/bash/exe/khatus_sensor_loadavg.sh similarity index 100% rename from src/bash/exe/khatus_sensor_loadavg.sh rename to v2/src/bash/exe/khatus_sensor_loadavg.sh diff --git a/src/bash/exe/khatus_sensor_memory.sh b/v2/src/bash/exe/khatus_sensor_memory.sh similarity index 100% rename from src/bash/exe/khatus_sensor_memory.sh rename to v2/src/bash/exe/khatus_sensor_memory.sh diff --git a/src/bash/exe/khatus_sensor_mpd.sh b/v2/src/bash/exe/khatus_sensor_mpd.sh similarity index 100% rename from src/bash/exe/khatus_sensor_mpd.sh rename to v2/src/bash/exe/khatus_sensor_mpd.sh diff --git a/src/bash/exe/khatus_sensor_net_addr_io.sh b/v2/src/bash/exe/khatus_sensor_net_addr_io.sh similarity index 100% rename from src/bash/exe/khatus_sensor_net_addr_io.sh rename to v2/src/bash/exe/khatus_sensor_net_addr_io.sh diff --git a/src/bash/exe/khatus_sensor_net_wifi_status.sh b/v2/src/bash/exe/khatus_sensor_net_wifi_status.sh similarity index 100% rename from src/bash/exe/khatus_sensor_net_wifi_status.sh rename to v2/src/bash/exe/khatus_sensor_net_wifi_status.sh diff --git a/src/bash/exe/khatus_sensor_procs.sh b/v2/src/bash/exe/khatus_sensor_procs.sh similarity index 100% rename from src/bash/exe/khatus_sensor_procs.sh rename to v2/src/bash/exe/khatus_sensor_procs.sh diff --git a/src/bash/exe/khatus_sensor_screen_brightness.sh b/v2/src/bash/exe/khatus_sensor_screen_brightness.sh similarity index 100% rename from src/bash/exe/khatus_sensor_screen_brightness.sh rename to v2/src/bash/exe/khatus_sensor_screen_brightness.sh diff --git a/src/bash/exe/khatus_sensor_temperature.sh b/v2/src/bash/exe/khatus_sensor_temperature.sh similarity index 100% rename from src/bash/exe/khatus_sensor_temperature.sh rename to v2/src/bash/exe/khatus_sensor_temperature.sh diff --git a/src/bash/exe/khatus_sensor_volume.sh b/v2/src/bash/exe/khatus_sensor_volume.sh similarity index 100% rename from src/bash/exe/khatus_sensor_volume.sh rename to v2/src/bash/exe/khatus_sensor_volume.sh diff --git a/src/bash/exe/khatus_sensor_weather.sh b/v2/src/bash/exe/khatus_sensor_weather.sh similarity index 100% rename from src/bash/exe/khatus_sensor_weather.sh rename to v2/src/bash/exe/khatus_sensor_weather.sh diff --git a/.gitignore b/v3/.gitignore similarity index 68% rename from .gitignore rename to v3/.gitignore index 271527f..02cd8d8 100644 --- a/.gitignore +++ b/v3/.gitignore @@ -1,3 +1,2 @@ _build/ bin/ -data/ diff --git a/v3/Makefile b/v3/Makefile new file mode 100644 index 0000000..dc01562 --- /dev/null +++ b/v3/Makefile @@ -0,0 +1,30 @@ +MAKEFLAGS := --no-builtin-rules + +PREFIX := $(HOME) +EXE_NAME := khatus_cache_dumper +EXE_TYPE := native # native | byte + +.PHONY: \ + build \ + install \ + clean + +build: | bin + @ocamlbuild \ + -cflags '-w A' \ + -pkg unix \ + -I src/exe \ + -I src/lib \ + $(EXE_NAME).$(EXE_TYPE) + @mv _build/src/exe/$(EXE_NAME).$(EXE_TYPE) bin/$(EXE_NAME) + @rm -f $(EXE_NAME).$(EXE_TYPE) + +install: + $(foreach filename,$(wildcard bin/*),cp -p "$(filename)" "$(PREFIX)/$(filename)"; ) + +clean: + @rm -rf bin + @ocamlbuild -clean + +bin: + @mkdir -p bin diff --git a/src/ocaml/exe/khatus_cache_dumper.ml b/v3/src/exe/khatus_cache_dumper.ml similarity index 100% rename from src/ocaml/exe/khatus_cache_dumper.ml rename to v3/src/exe/khatus_cache_dumper.ml diff --git a/src/ocaml/exe/khatus_cache_dumper.mli b/v3/src/exe/khatus_cache_dumper.mli similarity index 100% rename from src/ocaml/exe/khatus_cache_dumper.mli rename to v3/src/exe/khatus_cache_dumper.mli diff --git a/src/ocaml/lib/khatus.ml b/v3/src/lib/khatus.ml similarity index 100% rename from src/ocaml/lib/khatus.ml rename to v3/src/lib/khatus.ml diff --git a/src/ocaml/lib/khatus_cache.ml b/v3/src/lib/khatus_cache.ml similarity index 100% rename from src/ocaml/lib/khatus_cache.ml rename to v3/src/lib/khatus_cache.ml diff --git a/src/ocaml/lib/khatus_cache.mli b/v3/src/lib/khatus_cache.mli similarity index 100% rename from src/ocaml/lib/khatus_cache.mli rename to v3/src/lib/khatus_cache.mli diff --git a/src/ocaml/lib/khatus_msg.ml b/v3/src/lib/khatus_msg.ml similarity index 100% rename from src/ocaml/lib/khatus_msg.ml rename to v3/src/lib/khatus_msg.ml diff --git a/src/ocaml/lib/khatus_msg.mli b/v3/src/lib/khatus_msg.mli similarity index 100% rename from src/ocaml/lib/khatus_msg.mli rename to v3/src/lib/khatus_msg.mli diff --git a/src/ocaml/lib/khatus_msg_parser.mli b/v3/src/lib/khatus_msg_parser.mli similarity index 100% rename from src/ocaml/lib/khatus_msg_parser.mli rename to v3/src/lib/khatus_msg_parser.mli diff --git a/src/ocaml/lib/khatus_msg_parser.mll b/v3/src/lib/khatus_msg_parser.mll similarity index 100% rename from src/ocaml/lib/khatus_msg_parser.mll rename to v3/src/lib/khatus_msg_parser.mll diff --git a/src/ocaml/lib/khatus_msg_stream.ml b/v3/src/lib/khatus_msg_stream.ml similarity index 100% rename from src/ocaml/lib/khatus_msg_stream.ml rename to v3/src/lib/khatus_msg_stream.ml diff --git a/src/ocaml/lib/khatus_msg_stream.mli b/v3/src/lib/khatus_msg_stream.mli similarity index 100% rename from src/ocaml/lib/khatus_msg_stream.mli rename to v3/src/lib/khatus_msg_stream.mli diff --git a/src/ocaml/lib/khatus_state.ml b/v3/src/lib/khatus_state.ml similarity index 100% rename from src/ocaml/lib/khatus_state.ml rename to v3/src/lib/khatus_state.ml diff --git a/src/ocaml/lib/khatus_state.mli b/v3/src/lib/khatus_state.mli similarity index 100% rename from src/ocaml/lib/khatus_state.mli rename to v3/src/lib/khatus_state.mli diff --git a/src/ocaml/lib/khatus_time.ml b/v3/src/lib/khatus_time.ml similarity index 100% rename from src/ocaml/lib/khatus_time.ml rename to v3/src/lib/khatus_time.ml diff --git a/src/ocaml/lib/khatus_time.mli b/v3/src/lib/khatus_time.mli similarity index 100% rename from src/ocaml/lib/khatus_time.mli rename to v3/src/lib/khatus_time.mli