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

v0.0.2-alpha #66

Merged
merged 485 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
485 commits
Select commit Hold shift + click to select a range
1c64067
trying to fix tests on check_permissions_screen I
Jun 21, 2024
3ad4a3f
removed duplicated test on check_permissions_screen
qlrd Jun 22, 2024
7a201f4
coveraged 100% of greetings_screen
qlrd Jun 22, 2024
ce2b7b2
coveraged 95% of check_permissions_screen
qlrd Jun 22, 2024
1cfdb00
refactored base_download_screen and added its tests
qlrd Jun 23, 2024
eea9c47
coveraged 90% of download_stable_zip_screen
qlrd Jun 23, 2024
de11a78
coveraged base_download_screen to 100%
Jun 24, 2024
e4ca675
coveraged 100% of download_stable_zip_screen
qlrd Jun 24, 2024
623703c
coveraged 100% of download_stable_zip_sha256_screen
qlrd Jun 24, 2024
d908df8
coveraged 100% of download_stable_zip_sig_screen
Jun 25, 2024
1689dc9
coveraged 100% of download_selfcustody_pem_screen
Jun 25, 2024
f3d6866
coveraged 100% of download_beta_screen
Jun 25, 2024
56d0b86
coveraged 100% of warning_already_downloaded_screen
Jun 26, 2024
c6ea6d6
coveraged 98% of unzip_stable_screen
Jun 27, 2024
6591633
coveraged 100% of unzip_stable_screen
Jun 28, 2024
d9fdcf7
added build steps for MacOS on .ci/build.py
Jun 28, 2024
4705790
added verify_sha256 test on verify_stable_zip_screen
qlrd Jun 29, 2024
7bf5b2e
coveraged 78% of verify_stable_zip_screen
qlrd Jul 1, 2024
804e0bf
coveraged 100% verify_stable_zip_screen
Jul 1, 2024
9f1dc0a
coveraged 100% base_krux_installer
Jul 1, 2024
c61058a
coveraged 65% of config_krux_installer
qlrd Jul 2, 2024
c72ad53
coveraged 65% of config_krux_installer II
qlrd Jul 2, 2024
9640c86
coveraged 100% of config_krux_installer
qlrd Jul 3, 2024
23e8479
coveraged 100% of app.__init__
qlrd Jul 4, 2024
9fcf3f0
FlashScreen can flash 😀
qlrd Jul 5, 2024
ea062f1
Fixed some tests for utils.trigger_flasher
qlrd Jul 6, 2024
c8c8adc
fixed tests after implemented flash on base_flasher module
qlrd Jul 7, 2024
a844910
fixed some typo in tests after implemented flash on trigger_flasher m…
qlrd Jul 7, 2024
58fcd8d
coveraged 100% flasher module
qlrd Jul 7, 2024
f5dcb79
coveraged 100% of utils.wiper module
qlrd Jul 7, 2024
c6e369e
fixed tests on download screens after fixing graphics
qlrd Jul 8, 2024
e45a41b
fixed graphics on warning_alread_downloaded_screen
qlrd Jul 8, 2024
11e1565
Found a method to complete parte KTool's output to GUI
qlrd Jul 9, 2024
5da2b55
created a near good ktool's parser for FlashScreen
qlrd Jul 9, 2024
e9098f1
coveraged 100% of warning_beta_screen
qlrd Jul 10, 2024
2236195
coveraged 100% of unzip_stable_screen
qlrd Jul 10, 2024
bb31efb
fixed partial call in config_krux_installed that raised errors when c…
qlrd Jul 10, 2024
e95ee67
Implemented WipeScreen that can wipe a device
qlrd Jul 10, 2024
e2c414e
fixed some tests after added WipeScreen
qlrd Jul 11, 2024
fa1b80c
coveraged 100% config_krux_installer
qlrd Jul 11, 2024
20d73b0
coveraged 100% of base_download_screen
qlrd Jul 11, 2024
51e37dc
coveraged 100% of base_flash_screen
qlrd Jul 11, 2024
3773885
coveraged 100% base_screen
qlrd Jul 11, 2024
4c261c0
coveraged 100% of base_flasher
qlrd Jul 12, 2024
a662f0f
added images to wipe_screen signaling the process
qlrd Jul 12, 2024
7910d7d
added some message/image combo to flash_screen and wipe_screen
qlrd Jul 12, 2024
5f6a619
Fixed addtion of GIF image to be a loader on wipe process
qlrd Jul 14, 2024
5c0f6df
substituted logo for an image
qlrd Jul 14, 2024
d091e53
moved configuration of check system from GreetingsScreen to KruxInsta…
qlrd Jul 15, 2024
f7243c8
simplified the thread that download assets
qlrd Jul 16, 2024
850ddfc
coveraged 100% base_screen
qlrd Jul 16, 2024
3c9cb0b
separated base_flash_screen tests to flash_screen tests
qlrd Jul 16, 2024
760b774
added test in flash to verify a ascii progress
qlrd Jul 17, 2024
c7e3c44
added test in flash to verify a ascii progress II
qlrd Jul 17, 2024
39cd84d
simplfied flasher modules (flash and wipe)
qlrd Jul 18, 2024
17a4f4e
coveraged 100% src.utilf.flasher.flasher
qlrd Jul 18, 2024
2e35477
coveraged 100% src.utilf.flasher.flasher II
qlrd Jul 18, 2024
bab975c
added device property of newport variable to better specification on …
qlrd Jul 19, 2024
a0fb646
fixed tests on flash and wiper
qlrd Jul 19, 2024
7c59b3a
coveraged 100% stream_downloader
qlrd Jul 19, 2024
45bb37b
coveraged 100% of flash_screen
qlrd Jul 19, 2024
615bf3f
coveraged 100% wipe_screen
qlrd Jul 19, 2024
980905c
updated badges on README
qlrd Jul 19, 2024
8f0f86e
coveraged 100% download_beta_screen
qlrd Jul 20, 2024
268af2d
coveraged 100% download_beta_screen fix path of firmware
qlrd Jul 20, 2024
bb33e70
coveraged 100% of download_stable_zip_screen
qlrd Jul 20, 2024
fb912bc
coveraged 100% download_stable_zip_sha256_screen
qlrd Jul 21, 2024
610444f
Added summary to README
qlrd Jul 21, 2024
c92dadc
coveraged 100% of download_stable_zip_sig_screen
qlrd Jul 21, 2024
425e3da
coveraged 100% of download_selfcustody_pem_screen
qlrd Jul 21, 2024
54cd648
coveraged 100% of greetings_screen
qlrd Jul 21, 2024
48cfad9
coveraged 100% of greetings_screen II (fix differences in window size)
qlrd Jul 21, 2024
5302531
added CheckInternetConnectionScreen and ErrorScreen
qlrd Jul 22, 2024
2d6612f
Created a formatting process to ErrorScreen
qlrd Jul 22, 2024
6815c28
coveraged 100% src.app.__init__
qlrd Jul 22, 2024
748744a
added build for macos-14 ARM64
qlrd Jul 22, 2024
c094c46
added build for macos-14 ARM64 II (fix architeture on poetry-cache)
qlrd Jul 23, 2024
c2ef50d
added build for macos-14 ARM64 III (fix typo on architecture parameter)
qlrd Jul 23, 2024
3f1cab2
added build for macos-14 ARM64 IV (fix add create-dmg)
qlrd Jul 23, 2024
5ebe3fa
added matrix of architecture on pytest and build jobs
qlrd Jul 23, 2024
5a50321
added a .deb package builder in .ci/
qlrd Jul 23, 2024
aee15d3
added a .deb package builder in .ci/ II
qlrd Jul 23, 2024
a50ffe2
fix I for tests workflow
qlrd Jul 24, 2024
3eb7ba7
fix II for tests workflow
qlrd Jul 24, 2024
ac2b44a
fix III for tests workflow
qlrd Jul 24, 2024
ec47ff8
fix IV for tests workflow
qlrd Jul 24, 2024
09ee5af
fix IV for tests workflow
qlrd Jul 24, 2024
fa73bab
added desktop entry for .deb packge
qlrd Jul 24, 2024
8ff5fc5
fix I for added desktop entry for .deb packge
qlrd Jul 24, 2024
1c0d7bf
fix II for added desktop entry for .deb packge
qlrd Jul 24, 2024
9532843
fix III for added desktop entry for .deb package
qlrd Jul 24, 2024
bded85c
fix IV for added desktop entry for .deb package
qlrd Jul 24, 2024
9061420
fix V on create-deb package
qlrd Jul 24, 2024
91a51d1
fix VI for added desktop entry for .deb package
qlrd Jul 25, 2024
000a1a9
fix VII for added desktop entry for .deb package
qlrd Jul 25, 2024
8c46c61
fix VIII for added desktop entry for .deb package
qlrd Jul 25, 2024
97e639b
fix IX for added desktop entry for .deb package
qlrd Jul 25, 2024
cedfbb8
fix X for added desktop entry for .deb package
qlrd Jul 25, 2024
40d878d
fix XI for added desktop entry for .deb package
qlrd Jul 25, 2024
04cd9e5
fix XII for added desktop entry for .deb package
qlrd Jul 25, 2024
53dea0c
fix XIII for added desktop entry for .deb package
qlrd Jul 25, 2024
a2d3fea
added Error page redirection from CheckPermissionsScreen
qlrd Jul 26, 2024
6998e03
fixing build process for mac that not found openssl libs
qlrd Jul 27, 2024
7057f86
added NSIS builder
qlrd Jul 29, 2024
9873015
added NSIS builder II
qlrd Jul 29, 2024
7c74ae8
added NSIS builder III
qlrd Jul 29, 2024
75dc489
added NSIS builder IV
qlrd Jul 29, 2024
255ed50
added NSIS builder V
qlrd Jul 29, 2024
ecf23bb
added NSIS builder VI
qlrd Jul 29, 2024
aa4e53c
added NSIS builder VII
qlrd Jul 29, 2024
8c6859c
added NSIS builder VIII
qlrd Jul 29, 2024
446c55e
added NSIS builder IX
qlrd Jul 29, 2024
454267f
added NSIS builder X
qlrd Jul 29, 2024
2a89829
added NSIS builder XI
qlrd Jul 29, 2024
d68f423
added NSIS builder XIII
qlrd Jul 29, 2024
7ec515e
added NSIS builder XIII
qlrd Jul 29, 2024
42090ba
added NSIS builder XIV
qlrd Jul 29, 2024
d9820c9
added NSIS builder XV
qlrd Jul 29, 2024
111cdc2
added NSIS builder XVI
qlrd Jul 29, 2024
2685f0d
added NSIS builder XVII
qlrd Jul 29, 2024
6a46b1d
added NSIS builder XVIII
qlrd Jul 29, 2024
6bbaa05
added NSIS builder XIX
qlrd Jul 29, 2024
8d9954e
added NSIS builder XX
qlrd Jul 29, 2024
d466feb
added NSIS builder XXI
qlrd Jul 29, 2024
4db716e
added redirect_exception method to check_internet_connection_screen
qlrd Jul 30, 2024
5f52f70
added rpm builder
qlrd Jul 30, 2024
23f7793
added rpm builder II
qlrd Jul 30, 2024
3b44d3b
added rpm builder III
qlrd Jul 30, 2024
f49ae3a
added rpm builder IV
qlrd Jul 30, 2024
e4fdc82
added rpm builder V
qlrd Jul 30, 2024
3a07be4
added rpm builder VI
qlrd Jul 30, 2024
b6c79ef
added rpm builder VII
qlrd Jul 30, 2024
aabdfd1
added rpm builder VIII
qlrd Jul 30, 2024
c851f94
added rpm builder IX
qlrd Jul 30, 2024
6050113
added rpm builder X
qlrd Jul 30, 2024
d6b9745
added rpm builder XI
qlrd Jul 30, 2024
8e99e7a
added rpm builder XII
qlrd Jul 30, 2024
b1c423d
added rpm builder XIII
qlrd Jul 30, 2024
0bc1d02
added rpm builder XIV
qlrd Jul 30, 2024
2ccca6e
added rpm builder XV
qlrd Jul 30, 2024
ccd1ce1
added rpm builder XVI
Jul 31, 2024
d2cbe9d
added rpm builder XVII
Jul 31, 2024
499f483
added rpm builder XVIII
Jul 31, 2024
10ea954
updated action sha256sum to v3
Jul 31, 2024
3be180a
added rpm build XIX
Jul 31, 2024
bd25edc
added rpm build XX
Jul 31, 2024
a7d3727
fixed locale detection on windows
qlrd Aug 1, 2024
0db04b8
Merge branch 'kivy' of github.com:qlrd/krux-installer into kivy
qlrd Aug 1, 2024
dc70d11
fixed some tests on windows
qlrd Aug 1, 2024
cec4fa4
added redirect_error method to show errors for select_version_screen
qlrd Aug 2, 2024
e52c79a
added redirect_error method to show errors for select_old_version_screen
qlrd Aug 2, 2024
e847160
added redirection of exception during the fetching releases step when…
qlrd Aug 2, 2024
3fc4efc
added redirection of exception for select_device_screen
qlrd Aug 2, 2024
0b7f706
added transalation for about_screen
qlrd Aug 2, 2024
95df127
added translation to check_internet_connection_screen
qlrd Aug 2, 2024
bb7ce89
fixed the build process for windows that didnt allowed to do the flas…
qlrd Aug 2, 2024
915cd89
added redirect_error method to download_stable_zip_screen
qlrd Aug 3, 2024
781d0d0
Fixed the addition of desktop shortcut on NSIS Setup installer for wi…
qlrd Aug 4, 2024
9ea854b
Trying to fix import of images on bundled exe in windows
qlrd Aug 5, 2024
4d92dfb
restructured verify_stable_zip_screen to fir better UX
qlrd Aug 5, 2024
00f1c09
restructured verify_stable_zip_screen to fir better UX II
qlrd Aug 5, 2024
7e018b8
Fixing build process on windows that didnt allowed some png to be pro…
qlrd Aug 6, 2024
fec63be
Fixing build process on windows that didnt allowed some png to be pro…
qlrd Aug 6, 2024
668b235
Maximized window at start and size fonts will be set dinamically in s…
Aug 6, 2024
7621886
Maximized window at start and size fonts will be set dinamically in s…
Aug 6, 2024
17190ad
Maximized window at start and size fonts will be set dinamically in s…
Aug 6, 2024
3a23208
updated dynamic font size on download screens
Aug 6, 2024
dca3b2f
adjusted font sizes in download screens for darwin
qlrd Aug 6, 2024
67f43ab
adjusted font sizes in verify stable zip screen (macos, need to check…
qlrd Aug 7, 2024
ec991cf
updated dynamic font size on download screens from macos to linux (an…
Aug 7, 2024
20f58ca
adjusted warning already downloaded screen with structured text
Aug 7, 2024
61e398c
Adjusted unzip stable screen and its translation
Aug 7, 2024
33aee1f
updated translations for air-gapped update messages
qlrd Aug 8, 2024
597ced5
adjusted structured text in about_screen
qlrd Aug 8, 2024
2480235
added hidden import of pillow image to load gif
qlrd Aug 8, 2024
d05dd67
Added support for ko_KR locale
qlrd Aug 9, 2024
2eec54f
Added support for ko_KR locale II
qlrd Aug 9, 2024
10c4ad7
added buttons Back and Quit to flash screen
qlrd Aug 9, 2024
5a63870
adjusted check permissions screen
qlrd Aug 10, 2024
83e3977
adapted font for korean translation on about_screen
qlrd Aug 12, 2024
435f8d5
adusted font for korean translation on check permissions screen
qlrd Aug 12, 2024
13a737a
fixed changing of fonts when change locales
qlrd Aug 13, 2024
6580139
fixed changing of fonts when change locales II
qlrd Aug 13, 2024
6e37777
fixed changing of fonts when change locales III
qlrd Aug 13, 2024
cd50d49
fixed changing of fonts when change locales IV
qlrd Aug 13, 2024
3f4291c
fixed changing of fonts when change locales V
qlrd Aug 13, 2024
afb5063
fixed on mac the size of text 'fetching data from' when user try to s…
qlrd Aug 13, 2024
2e7b874
fixed translation and its font selection on select_version_screen
qlrd Aug 13, 2024
e725c42
fixed translation and its font selection on select_version_screen II
qlrd Aug 13, 2024
dc21189
fixed translation and its font selection on select_version_screen III
qlrd Aug 13, 2024
adbf6d6
fixed translation and its font selection on select_version_screen IV
qlrd Aug 13, 2024
05694b3
fixed changing font when select locale on select_old_version_screen
qlrd Aug 13, 2024
64a7fac
fixed changing font when select locale on warning_beta_screen
qlrd Aug 13, 2024
476d446
fixed changing font when select locale on download_beta_screen
qlrd Aug 15, 2024
4972de7
fixed changing font when select locale on download_beta_screen II
qlrd Aug 15, 2024
d554407
fixed changing font when select locale on select_device_screen
qlrd Aug 15, 2024
f880723
fixed the version/device and the availability of flash button due cha…
qlrd Aug 15, 2024
8a0d4d1
fixed the version/device and the availability of flash button due cha…
qlrd Aug 15, 2024
bac865e
fixed changing font when select locale on warning_alaready_downloaded…
qlrd Aug 15, 2024
9202878
fixed some fonts on download_stable_zip_screen
qlrd Aug 15, 2024
2d862a3
fixed some fonts on download_stable_zip_sha256_screen
Aug 16, 2024
a13b1f4
fixed some fonts on download_stable_zip_sig_screen
Aug 16, 2024
aeac6b4
fixed some fonts on download_selfcustody_pem_screen
Aug 16, 2024
4d724db
fixed some fonts on verify_stable_zip_screen
Aug 17, 2024
8559010
fixed some fonts on unzip_stable_screen
qlrd Aug 17, 2024
8b3d41c
fixed some fonts on unzip_stable_screen II
qlrd Aug 17, 2024
9719865
added build-win poe task
qlrd Aug 17, 2024
114ed4b
added build-win poe task II
qlrd Aug 18, 2024
eb38478
added build-win poe task III
qlrd Aug 18, 2024
dde75b8
translated app to nl_NL
qlrd Aug 18, 2024
9afe8d3
fixed fonts on wipe_screen when change locale
qlrd Aug 18, 2024
21a4033
added traceback's formatting when an error occur on flash_screen
qlrd Aug 19, 2024
9a3194d
erge branch 'kivy' of github.com:qlrd/krux-installer into kivy
qlrd Aug 19, 2024
bf4dc83
removed thread.join method that blocks GUI
qlrd Aug 19, 2024
fd8b20a
added zh_CN locale and fixed some translations
qlrd Aug 19, 2024
46b3cf1
fixed selection of yahboom on beta_download_screen
qlrd Aug 19, 2024
41ce9fe
added WarningWipeScreen
qlrd Aug 20, 2024
419385f
Merge branch 'kivy' of github.com:qlrd/krux-installer into kivy
qlrd Aug 20, 2024
76a1f23
updated expression 'Program firmware' to 'Flash firmware'
qlrd Aug 20, 2024
3f0879e
Updated README, CHANGELOG and TODO
qlrd Aug 20, 2024
8081406
Fixed README typo
qlrd Aug 20, 2024
356e999
changed version to 0.0.2-alpha
qlrd Aug 20, 2024
2039184
changed version to 0.0.2-alpha II
qlrd Aug 20, 2024
b8e6313
fixed wipe messages on Windows
qlrd Aug 20, 2024
8664fc3
fixed wipe and flash screen messages on Linux
qlrd Aug 20, 2024
7669cef
fixed sizes in wipe and flash screen
qlrd Aug 20, 2024
876e40a
Merge branch 'kivy' into main_new
qlrd Aug 21, 2024
86572fd
Merge pull request #6 from qlrd/main_new
qlrd Aug 21, 2024
c4d1682
Updated README
qlrd Aug 21, 2024
b14a3a0
linted CHANGELOG and README
qlrd Aug 21, 2024
2734042
Added some issue-templates
qlrd Aug 21, 2024
ac48e61
Update nl_NL i18n translations
PMK Aug 21, 2024
6909a05
unified font NotoSansCJK-Cy_SC_KR
qlrd Aug 22, 2024
cb16ea8
fixed a translation for checking_permissions_screen
qlrd Aug 22, 2024
858846b
Traduit par Jeanne Do et Jeannette Do
Aug 23, 2024
3d8d78d
Updated README to warning about patch-nix poe task
qlrd Aug 23, 2024
9f24db7
Updated readme to warning about the wget tool before run the patch-ni…
qlrd Aug 23, 2024
fe4c390
linted README
qlrd Aug 23, 2024
79a53e7
Merge pull request #8 from jdlcdl/pr_66
qlrd Aug 23, 2024
f19d9a2
added check support for locale and default it to en_US if not exist
qlrd Aug 24, 2024
bc3ec6b
added support for wonder_mv for beta version of firmware
qlrd Aug 24, 2024
6aaf4f6
updated pt_BR translation according tadeubas suggestion
qlrd Aug 24, 2024
eda70ea
added a message to not unplug device in accord to tadeubas suggestion
qlrd Aug 24, 2024
5b462fa
added underline to some markuped texts on warning_beta_screen in acco…
qlrd Aug 25, 2024
920cb0e
added underlined markup text on buttons of warning_wipe_screen
qlrd Aug 25, 2024
87bd3a3
updated some modifications according tadeubas about non-clicable and …
qlrd Aug 25, 2024
631a9c2
added word 'soon' to air-gapped update option on unzip_stable_screen
qlrd Aug 25, 2024
ecf8e23
fixed build-win poe task
qlrd Aug 25, 2024
38963c9
fixed bug on default locale if OS locale isnt supported
qlrd Aug 26, 2024
344576d
fixed bug on default locale if OS locale isnt supported II
qlrd Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
204 changes: 204 additions & 0 deletions .ci/create-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
#!/bin/env sh

# see https://github.com/raspiblitz/raspiblitz/blob/dev/build_sdcard.sh

me="${0##/*}"
nocolor="\033[0m"
red="\033[31m"

## usage as a function to be called whenever there is a huge mistake on the options
usage(){
printf %s"${me} [--option <argument>]

Options:
-h, --help this help info
-a, --app-name <appname> the application name
-o, --output-dir <outdir> the output directory
-v, --version <version> the application version
-A, --architecture <arch> the application architecture
-m, --maintainer-name <name> the application maintainer name
-e, --maintainer-email <email> the application maintainer email
-d, --description <description> the application description
-b, --binary the application binary
-i, --icon the application icon image

Notes:
all options, long and short accept --opt=value mode also
[0|1] can also be referenced as [false|true]
"
exit 1
}

if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
usage
fi

## assign_value variable_name "${opt}"
## it strips the dashes and assign the clean value to the variable
## assign_value status --on IS status=on
## variable_name is the name you want it to have
## $opt being options with single or double dashes that don't require arguments
assign_value(){
case "${2}" in
--*) value="${2#--}";;
-*) value="${2#-}";;
*) value="${2}"
esac
case "${value}" in
0) value="false";;
1) value="true";;
esac
## Escaping quotes is needed because else if will fail if the argument is quoted
# shellcheck disable=SC2140
eval "${1}"="\"${value}\""
}

## default user message
error_msg(){ printf %s"${red}${me}: ${1}${nocolor}\n"; exit 1; }

## get_arg variable_name "${opt}" "${arg}"
## get_arg service --service ssh
## variable_name is the name you want it to have
## $opt being options with single or double dashes
## $arg is requiring and argument, else it fails
## assign_value "${1}" "${3}" means it is assining the argument ($3) to the variable_name ($1)
get_arg(){
case "${3}" in
""|-*) error_msg "Option '${2}' requires an argument.";;
esac
assign_value "${1}" "${3}"
}

## hacky getopts
## 1. if the option requires an argument, and the option is preceeded by single or double dash and it
## can be it can be specified with '-s=ssh' or '-s ssh' or '--service=ssh' or '--service ssh'
## use: get_arg variable_name "${opt}" "${arg}"
## 2. if a bunch of options that does different things are to be assigned to the same variable
## and the option is preceeded by single or double dash use: assign_value variable_name "${opt}"
## as this option does not require argument, specifu $shift_n=1
## 3. if the option does not start with dash and does not require argument, assign to command manually.
while :; do
case "${1}" in
-*=*) opt="${1%=*}"; arg="${1#*=}"; shift_n=1;;
-*) opt="${1}"; arg="${2}"; shift_n=2;;
*) opt="${1}"; arg="${2}"; shift_n=1;;
esac
case "${opt}" in
-a|-a=*|--app-name|--app-name=*) get_arg app_name "${opt}" "${arg}";;
-o|-o=*|--output-dir|--output-dir=*) get_arg output_dir "${opt}" "${arg}";;
-v|-v=*|--version|--version=*) get_arg version "${opt}" "${arg}";;
-A|-A=*|--architecture|--architecture=*) get_arg architecture "${opt}" "${arg}";;
-m|-m=*|--maintainer-name|--maintainer-name=*) get_arg maintainer_name "${opt}" "${arg}";;
-e|-e=*|--maintainer-email|--maintainer-email=*) get_arg maintainer_email "${opt}" "${arg}";;
-d|-d=*|--description|--description=*) get_arg description "${opt}" "${arg}";;
-b|-b=*|--binary|--binary=*) get_arg binary "${opt}" "${arg}";;
-i|-i=*|--icon|--icon=*) get_arg icon "${opt}" "${arg}";;
"") break;;
*) echo "Invalid option: ${opt}";;
esac
shift "${shift_n}"
done


echo "================="
echo "create-deb v0.0.1"
echo "================="
echo ""
echo "Defined variables"
echo "-----------------"
for key in app_name output_dir version architecture maintainer_name maintainer_email description binary icon; do
eval val='$'"${key}"
if [ -n "${val}" ]; then
printf '%s\n' "${key}=${val}"
elif [ -z "${val}"]; then
error_msg "${key} undefined"
fi
done

# convert x86_64 to amd64
if [ $architecture == "x86_64" ]; then
echo ""
echo "Replacing $architecture to amd64"
echo "--------------------------------"
architecture="amd64"
fi

echo""

FULL_OUTPUT_PATH=${output_dir}/${app_name}_${version}_${architecture}
mkdir -v -p $FULL_OUTPUT_PATH
mkdir -v -p $FULL_OUTPUT_PATH/DEBIAN
mkdir -v -p $FULL_OUTPUT_PATH/usr/local/bin
mkdir -v -p $FULL_OUTPUT_PATH/usr/share/applications
mkdir -v -p $FULL_OUTPUT_PATH/usr/share/icons/hicolor/
mkdir -v -p $FULL_OUTPUT_PATH/usr/share/icons/hicolor/512x512/
mkdir -v -p $FULL_OUTPUT_PATH/usr/share/icons/hicolor/512x512/apps
cp -v ${binary} $FULL_OUTPUT_PATH/usr/local/bin/${app_name}
cp -v ${icon} $FULL_OUTPUT_PATH/usr/share/icons/hicolor/512x512/apps/${app_name}.png

# create control file
cat <<EOF > $FULL_OUTPUT_PATH/DEBIAN/control
Package: ${app_name}
Version: ${version}
Architecture: ${architecture}
Maintainer: ${maintainer_name} <${maintainer_email}>
Description: ${description}
EOF

echo ""
echo "Resulting $FULL_OUTPUT_PATH/DEBIAN/control"
echo "----------------------------------------------------------------------"
cat $FULL_OUTPUT_PATH/DEBIAN/control

# create postscript file
cat <<EOF > $FULL_OUTPUT_PATH/DEBIAN/postinst
#!/bin/sh

echo ""
echo " -------------"
echo " !!!WARNING!!!"
echo " -------------"
echo ""
if [ -n "\$SUDO_USER" ] && [ "\$SUDO_USER" != "root" ]; then
echo "Adding user \$SUDO_USER to 'dialout' group to enable flash procedure..."
echo "You'll need to reboot your system to enable changes"
usermod -a -G dialout \$SUDO_USER
elif [ -n "\$USER" ] && [ "\$USER" != "root"]; then
echo "Adding user \$USER to 'dialout' group to enable flash procedure..."
echo "You'll need to reboot your system to enable changes"
usermod -a -G dialout \$USER
fi
echo ""
echo ""
EOF
chmod 0755 $FULL_OUTPUT_PATH/DEBIAN/postinst

echo ""
echo "Resulting $FULL_OUTPUT_PATH/DEBIAN/postinst"
echo "----------------------------------------------------------------------"
cat $FULL_OUTPUT_PATH/DEBIAN/postinst

# create desktop entry
cat <<EOF > $FULL_OUTPUT_PATH/usr/share/applications/${app_name}.desktop
[Desktop Entry]
Encoding=UTF-8
Version=${version}
Type=Application
Terminal=false
Exec=/usr/local/bin/${app_name}
Name=${app_name}
Icon=/usr/share/icons/highcolor/512x512/apps/${app_name}.png
EOF

echo ""
echo "Resulting $FULL_OUTPUT_PATH/usr/share/applications/${app_name}.desktop"
echo "-----------------------------------------------------------------------------------------------------"
cat $FULL_OUTPUT_PATH/usr/share/applications/${app_name}.desktop

echo ""
echo "setting permissions for $FULL_OUTPUT_PATH/usr/local/bin/${app_name}"
chmod +x $FULL_OUTPUT_PATH/usr/local/bin/${app_name}

# build .deb
echo "running dpkg-deb --build --root-owner-group $FULL_OUTPUT_PATH"
dpkg-deb --build --root-owner-group $FULL_OUTPUT_PATH
Loading
Loading