Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipe test #7

Merged
merged 28 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0d959f6
Setup for root copy
Tearran Jul 12, 2023
64088d1
moved options
Tearran Jul 13, 2023
ac1ab2d
removed test
Tearran Jul 15, 2023
46991bc
renamed: bin/cli_options.sh -> bin/configng.sh
Tearran Jul 15, 2023
07fc7b6
new file: lib/configng/system.sh
Tearran Jul 15, 2023
bca1200
modified: bin/configng.sh
Tearran Jul 15, 2023
819b7ed
Merge pull request #1 from Tearran/alpha
Tearran Jul 15, 2023
2bf9b19
new file: lib/configng/benchymark.sh
Tearran Jul 16, 2023
3e89f5e
Update README.md
Tearran Jul 16, 2023
88897a1
renamed: bin/configng.sh -> bin/config.sh
Tearran Jul 16, 2023
fa3034e
Merge branch 'main' of https://github.com/Tearran/configng
Tearran Jul 16, 2023
7d200a2
modified: bin/config.sh
Tearran Jul 16, 2023
712a725
modified: lib/config/benchymark.sh
Tearran Jul 16, 2023
0de1254
Merge branch 'armbian:main' into main
Tearran Jul 16, 2023
c332104
Merge pull request #2 from Tearran/alpha
Tearran Jul 16, 2023
c98c125
deleted: src/
Tearran Jul 16, 2023
09202c7
Update README.md
Tearran Jul 16, 2023
37fa45d
Update README.md
Tearran Jul 16, 2023
8545f4d
Update README.md
Tearran Jul 16, 2023
51b86d3
modified: bin/jampi-config
Tearran Jul 16, 2023
a9c969a
Merge branch 'main' of https://github.com/Tearran/configng
Tearran Jul 16, 2023
b5f5ef6
new file: lib/config/io.sh
Tearran Jul 17, 2023
6dc386e
lib/config/desktops.sh
Tearran Jul 17, 2023
de5b9a1
lib/config/desktops.sh
Tearran Jul 17, 2023
e6f0fcd
Update README.md
Tearran Jul 17, 2023
2128c70
renamed: lib/config/board_led.sh -> lib/config/boardled.sh
Tearran Jul 17, 2023
29df786
Merge branch 'main' of https://github.com/Tearran/configng
Tearran Jul 17, 2023
e1da6c7
deleted: lib/config/io.sh
Tearran Jul 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,45 +9,68 @@ may not include Python, C/C++, etc. build/runtime environments
* `sudo apt install git`
* `cd ~/`
* `git clone https://github.com/armbian/configng.git`
* `sudo ~/configng/configng.sh`
* `bash ~/configng/config.sh`

#### If all goes well you should see list or avalible commands
```
Usage: configng [ -h | foo ]
Usage: config [ -h | foo ]

Options:
-h) Print this help.

foo) Usage: configng foo [ boardled::options ][ cpu::options ][ extra_drive::options ][ benchymark::options ]::
foo) Usage: config foo [ desk_setup::options ][ io::options ][ boardled::options ][ cpu::options ][ extra_drive::options ][ benchymark::options ]::

desk_setup::options
see_desktops Display a list of avalible desktops to install.

io::options
set_ir_toggle [ enable ][ disable ] Infrared Remote Control.

boardled::options
set_sysled_cpu set the Sys board led to montor cpu activity.
set_sysled_none set the Sys board led to montor none.
see_sysled See a list of board led options.
see_sysled_none Set board led options to none (off).
see_sysled_cpu Set board led options to monitor CPU.
see_sysled_beat Set board led options to heartbeat pulse.

cpu::options
see_policy Return policy as int based on original armbian-config logic.
see_freqs Return CPU frequencies as string delimited by space.
see_min_freq Return CPU minimum frequency as string.
see_max_freq Return CPU maximum frequency as string.
see_governor Return CPU governor as string.
see_governors Return CPU governors as string delimited by space.
set_freq Set min, max and CPU governor.
see_governors Return CPU avalible governors as string delimited by space.
set_freq ** disabled ** Set min, max and CPU governor.

extra_drive::options
set_spi_vflash Set up a simulated MTD spi flash for testing.
rem_spi_vflash Remove tsting simulated MTD spi flash.

benchymark::options
see_monitor system boot-up performance statistics.
see_boot_blame system boot-up performance statistics.
see_7ZipBench 7-zip benchmark based on original armbianmonitor logic.
see_boot_times system boot-up performance statistics.

```
#### Change the systems led to pulse a hearbeat
```
bash ~/configng/bin/config.sh foo boardled::see_sysled_beat
```
#### Change the systems led to off show a result in whiptail or dialog if installed
```
bash ~/configng/bin/config.sh foo boardled::see_sysled_none | bash ~/configng/bin/jampi-config.sh
```
#### See avalible settings sytem led options and current setting in []
```
bash ~/configng/bin/config.sh foo boardled::see_sysled
```
#### See avalible armbian monitor options
```
bash ~/configng/bin/config.sh foo benchymark:see_monitor
```


## Coding standards
[Shell Style Guide](https://google.github.io/styleguide/shellguide.html) has some good ideas,
but fundementally look at the code in Bash Utility:
but fundementally look at the code in lib:
```
# @description Strip characters from the beginning of a string.
#
Expand Down
9 changes: 4 additions & 5 deletions bin/configng.sh → bin/config.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ directory="$(dirname "$(readlink -f "$0")")"
filename=$(basename "${BASH_SOURCE[0]}")

libpath="$directory/../lib"
#selfpath="$libpath/configng/cpu.sh"

if [[ -d "$directory/../lib" ]]; then
libpath="$directory"/../lib
# installed option todo change when lib location determined
#elif [[ ! -d "$directory/../lib" && -d "/usr/lib/bash-utility/" && -d "/usr/lib/configng/" ]]; then
#elif [[ ! -d "$directory/../lib" && -d "/usr/lib/bash-utility/" && -d "/usr/lib/config/" ]]; then
# libpath="/usr/lib"
else
echo "Libraries not found"
Expand All @@ -29,7 +28,7 @@ fi
for file in "$libpath"/bash-utility/*; do
source "$file"
done
for file in "$libpath"/configng/*; do
for file in "$libpath"/config/*; do
source "$file"
done

Expand All @@ -38,7 +37,7 @@ funnamearray=()
catagoryarray=()
descriptionarray=()

for file in "$libpath"/configng/*.sh; do
for file in "$libpath"/config/*.sh; do
mapfile -t temp_functionarray < <(grep -oP '^\w+::\w+' "$file")
functionarray+=("${temp_functionarray[@]}")

Expand Down Expand Up @@ -73,7 +72,7 @@ done
echo -e "Options:"
echo -e " -h) Print this help."
echo -e ""
echo -e " foo) Usage: ${filename%.*} foo $usage:: "
echo -e " foo) Usage: ${filename%.*} foo $usage "
echo ""

# Group options by prefix
Expand Down
Loading