Skip to content

Commit

Permalink
Runtime & documentation generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tearran committed Apr 12, 2024
1 parent b4880cd commit 74fa1f4
Show file tree
Hide file tree
Showing 15 changed files with 2,271 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ftp-deploy.yml.hold
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on: push
name: 🚀 Deploy website on push

jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'Tearran' }}
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3

- name: Install ShellCheck
run: sudo apt-get install pandoc git shellcheck
- name: Run ShellCheck
run: |
ret=0
for file in $(find . -type f -name "*.sh"); do
shellcheck --severity=error $file || ret=$?
done
exit $ret

- name: Generate website
run: ./bin/armbian-configng --dev --web

- name: 📂 Sync files
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.SERVER_HOST}} # replace with your server
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
server-dir: / # replace with your server directory
local-dir: share/armbian-configng/web/ # replace with your local directory

Empty file modified README.md
100755 → 100644
Empty file.
90 changes: 90 additions & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

# Armbian configuration utility
Utility for configuring your board, divided into four main sections:

- System - system and security settings,
- Network - wired, wireless, Bluetooth, access point,
- Personal - timezone, language, hostname,
- Software - system and 3rd party software install.



To Configure and change global sytem settings, run the following command: `./armbian-configng`

***

Following was updated on:
Thu Apr 11 02:23:43 AM MST 2024.

***
- ## **System**
- **S01** - Description: Enable Armbina kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s01)
- **S02** - Description: Disable Armbina kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s02)
- **S03** - Description: Edit the boot enviroment (WIP)
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s03)


- ## **Network**
- **BT0** - Description: Install Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt0)
- **BT1** - Description: Remove Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt1)
- **BT3** - Description: Bluetooth Discover
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt3)
- **IR0** - Description: Install Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir0)
- **IR1** - Description: Uninstall Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir1)
- **N00** - Description: Manage wifi network connections
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n00)
- **N01** - Description: Advanced Edit /etc/network/interface
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n01)
- **N02** - Description: Disconect and forget all wifi connections (Advanced)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n02)
- **N03** - Description: Toggle system IPv6/IPv4 internet protical
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n03)


- ## **Localisation**
- **L00** - Description: Change Globla timezone (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l00)
- **L01** - Description: Change Locales reconfigure the language and charitorset
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l01)
- **L02** - Description: Change Keyboard layout
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l02)
- **L03** - Description: Change APT mirrors
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l03)


- ## **Software**
- **I00** - Description: Update Application Repository
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i00)
- **I01** - Description: CLI System Monitor
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i01)


- ## **Help**
- **H00** - Description: About This systme. (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h00)
- **H02** - Description: List of Config function(WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h02)


***

# Development
get the lastet version of the utility by running the following command:

~~~
git clone https://github.com/armbian/configng.git
cd configng
~~~



## Note:
>
> The Bash procedures embedded within the JSON structure are meticulously designed with a focus on clear naming conventions and the simplicity of key pairs. These procedures serve multiple purposes, including facilitating the generation of content in various formats, such as Whiptail, Markdown, json out and others. Moreover, they are utilized for evaluation and execution of commands outlined in the JSON structure.
>
78 changes: 78 additions & 0 deletions bin/configng
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/bin/bash


tput init
#
# Language-based variable assignment for script directory path
# This serves as a Rosetta Stone for developers,
# allowing them to use the variable name they are most comfortable with.

# allows CTRL c to exit
trap "exit" INT TERM

# Get the script directory
script_dir="$(dirname "$0")"

# Define the lib directory one level up from the script directory
lib_dir="$script_dir/../lib/armbian-configng"
doc_dir="$script_dir/../share/doc/armbian-configng"
# Check for the existence of the config.ng.jobs.json file in the lib directory
json_file="$lib_dir/config.ng.jobs.json"

#
# Load The Bash procedure Objects
json_data=$(cat "$json_file")


#
# We're checking if the 'whiptail' command is available on the system.
# 'whiptail' is a simple dialog box utility that works well with Bash. It doesn't have all the features of some other dialog box utilities, but it does everything we need for this script.
# If 'whiptail' is available, we assign its name to the variable DIALOG. This way, we can easily switch to another dialog box utility in the future if we need to, just by changing this one line of code.
[[ -x "$(command -v whiptail)" ]] && DIALOG="whiptail"


#
# Prepare the module options array
declare -A module_options


#
# Load configng core functions and module options array


source "$lib_dir/config.ng.functions.sh"
set_runtime_variables
echo "Loaded Runtime variables..." | show_infobox ;
set_newt_colors 2
echo "Loaded Dialog..." | show_infobox ;
source "$lib_dir/config.ng.docs.sh"
echo "Loaded Docs..." | show_infobox ;
source "$lib_dir/config.ng.network.sh"
echo "Loaded Network helpers..." | show_infobox ;


#
# Loads the varibles from beta armbian-config for runtime handeling

source "$lib_dir/config.ng.runtime.sh" ;
echo "Loaded Runtime conditions..." | show_infobox ;

#
# if not sudo
# Runtime "include this script" for USER and development setup condistion
if [[ $EUID != 0 ]]; then
source "$lib_dir/config.ng.runtime.dev.sh" ;
echo "Loaded Develoment
Runtime conditions..." | show_infobox ;

fi

tput clear
#
# Generate the top menu with the modified Object data
while generate_top_menu "$json_data"; do tput clear ; done


#
# Exit the script with a success status code
exit 0
Loading

0 comments on commit 74fa1f4

Please sign in to comment.