Skip to content

vroncevic/gen_rule

Repository files navigation

UDEV rules setup for interface boards

gen_rule is shell tool for generating rule access to user device.

Developed in bash code: 100%.

gen_rule_shell_checker

The README is used to introduce the tool and provide instructions on how to install the tool, any machine dependencies it may have and any other information that should be provided before the tool is installed.

GitHub issues open GitHub contributors

Table of Contents

Installation

Debian Linux OS

Navigate to release page download and extract release archive.

To install gen_rule type the following

tar xvzf gen_rule-x.y.tar.gz
cd gen_rule-x.y
cp -R ~/sh_tool/bin/   /root/scripts/gen_rule/ver.x.y/
cp -R ~/sh_tool/conf/  /root/scripts/gen_rule/ver.x.y/
cp -R ~/sh_tool/log/   /root/scripts/gen_rule/ver.x.y/

Self generated setup script and execution

./gen_rule_setup.sh

[setup] installing App/Tool/Script gen_rule
	Thu 02 Dec 2021 01:26:05 AM CET
[setup] copy App/Tool/Script structure
[setup] remove github editor configuration files
[setup] set App/Tool/Script permission
[setup] create symbolic link of App/Tool/Script
[setup] done

/root/scripts/gen_rule/ver.2.0/
├── bin/
│   ├── center.sh
│   ├── create_udev_file.sh
│   ├── display_logo.sh
│   ├── gen_rule.sh
│   ├── list_udev_files.sh
│   └── remove_udev_file.sh
├── conf/
│   ├── gen_rule.cfg
│   ├── gen_rule.logo
│   ├── gen_rule_util.cfg
│   ├── template/
│   │   ├── avr_dragon_isp.template
│   │   ├── avr_jtag_ice.template
│   │   ├── avr_silabs.template
│   │   ├── avr_usb_asp.template
│   │   ├── avr_usb_mkii.template
│   │   ├── avr_usb_tiny.template
│   │   └── msp430uif.template
│   ├── udev_rule_names.cfg
│   └── udev_templates.cfg
└── log/
    └── gen_rule.log

4 directories, 19 files
lrwxrwxrwx 1 root root 46 Dec  2 01:26 /root/bin/gen_rule -> /root/scripts/gen_rule/ver.2.0/bin/gen_rule.sh

Or You can use docker to create image/container.

Usage

# Create symlink for shell tool
ln -s /root/scripts/gen_rule/ver.x.y/bin/gen_rule.sh /root/bin/gen_rule

# Setting PATH
export PATH=${PATH}:/root/bin/

# Generating user device rule
gen_rule 

gen_rule ver.2.0
Thu 02 Dec 2021 01:41:27 AM CET

[check_root] Check permission for current session? [ok]
[check_root] Done

                                                              
                                                  ██          
                                                 ░██          
    █████   █████  ███████        ██████ ██   ██ ░██  █████   
   ██░░░██ ██░░░██░░██░░░██      ░░██░░█░██  ░██ ░██ ██░░░██  
  ░██  ░██░███████ ░██  ░██       ░██ ░ ░██  ░██ ░██░███████  
  ░░██████░██░░░░  ░██  ░██       ░██   ░██  ░██ ░██░██░░░░   
   ░░░░░██░░██████ ███  ░██ █████░███   ░░██████ ███░░██████  
    █████  ░░░░░░ ░░░   ░░ ░░░░░ ░░░     ░░░░░░ ░░░  ░░░░░░   
   ░░░░░                                                       
	                                      
		Info   github.io/gen_rule ver.2.0 
		Issue  github.io/issue
		Author vroncevic.github.io

  [USAGE] gen_rule [OPTIONS]
  [OPTIONS]
  [OPERATION] install | uninstall | list
  [TARGET DEVICE] Target device board
  # Instaling UDEV rule for AVR Dragon board
  gen_rule install avr_dragon
  [help | h] print this option

Dependencies

gen_rule requires next modules and libraries

Shell tool structure

gen_rule is based on MOP.

Shell tool structure

sh_tool/
├── bin/
│   ├── center.sh
│   ├── create_udev_file.sh
│   ├── display_logo.sh
│   ├── gen_rule.sh
│   ├── list_udev_files.sh
│   └── remove_udev_file.sh
├── conf/
│   ├── gen_rule.cfg
│   ├── gen_rule.logo
│   ├── gen_rule_util.cfg
│   ├── template/
│   │   ├── avr_dragon_isp.template
│   │   ├── avr_jtag_ice.template
│   │   ├── avr_silabs.template
│   │   ├── avr_usb_asp.template
│   │   ├── avr_usb_mkii.template
│   │   ├── avr_usb_tiny.template
│   │   └── msp430uif.template
│   ├── udev_rule_names.cfg
│   └── udev_templates.cfg
└── log/
    └── gen_rule.log

Docs

Documentation Status

More documentation and info at

Copyright and licence

License: GPL v3 License

Copyright (C) 2016 - 2024 by vroncevic.github.io/gen_rule

gen_rule is free software; you can redistribute it and/or modify it under the same terms as Bash itself, either Bash version 4.2.47 or, at your option, any later version of Bash 4 you may have available.

Lets help and support FSF.

Free Software Foundation

Donate