Compare commits

...

768 commits

Author SHA1 Message Date
aa2c6df97e
shellcheck/file
All checks were successful
/ job (push) Successful in 1m16s
2024-12-02 00:46:30 +01:00
45d93964e5
remove 2024-12-02 00:42:35 +01:00
0dfe86a970
target/shfmt 2024-12-02 00:39:16 +01:00
f3851dbc88
fixes 2024-12-02 00:30:01 +01:00
7dbf581191
self/subset,write 2024-12-02 00:06:42 +01:00
ce872d4ecb
file/append,empty 2024-12-01 23:40:54 +01:00
9f705e6af8
arg 2024-12-01 23:21:14 +01:00
8e2cd2a867
arg0 2024-12-01 23:20:05 +01:00
76176ae49f
cmd/install 2024-12-01 22:28:22 +01:00
3b11f3b459
rwx/shell 2024-12-01 22:13:16 +01:00
77a53428e1
rwx/shell 2024-12-01 22:11:52 +01:00
05e5d00a95
self/user 2024-12-01 22:10:05 +01:00
dc1fdbace7
−arg 2024-12-01 22:06:18 +01:00
a8f4ad7097
${0} 2024-12-01 22:01:38 +01:00
52b6c06cb1
self/command 2024-12-01 21:48:04 +01:00
b61ec7044d
fix 2024-12-01 21:39:41 +01:00
0818e81038
install/commands 2024-12-01 21:37:55 +01:00
f588882b1f
lib 2024-12-01 21:28:42 +01:00
ea8be45789
self/commands 2024-12-01 21:22:35 +01:00
bf10fd4a05
cs 2024-12-01 21:13:45 +01:00
1e1954ce9b
prefix 2024-12-01 21:03:57 +01:00
163ff926cd
fmt 2024-12-01 20:25:19 +01:00
b85e5768a8
unindent 2024-12-01 20:23:52 +01:00
527b2d2a67
rwx/shell 2024-12-01 20:15:05 +01:00
b67107c737
self/user 2024-12-01 20:03:28 +01:00
30b002c31e
git/rwx 2024-12-01 19:53:12 +01:00
2054f48931
main/shebang 2024-12-01 19:51:06 +01:00
46e14ebf32
+x 2024-12-01 19:50:30 +01:00
ba7a51e1b1
main/cmd 2024-12-01 19:49:14 +01:00
d94880bb75
main/shell 2024-12-01 19:40:52 +01:00
52a43b0e60
self/install 2024-12-01 19:06:44 +01:00
f06d1e2bce
rwx/link 2024-12-01 19:04:23 +01:00
a9c98b2853
rwx/remove 2024-12-01 19:01:05 +01:00
aec586aa2c
self/install 2024-12-01 18:58:27 +01:00
9b0b4ecb80
setup/main 2024-12-01 18:35:33 +01:00
428ea3e9e5
-n 2024-12-01 18:11:09 +01:00
6ed3cb83a6
gau/gf 2024-12-01 18:07:54 +01:00
c69c10684e
gau/git,gpg 2024-12-01 18:06:02 +01:00
01eb1bebd3
rwx/gau 2024-12-01 18:04:13 +01:00
81cb56bd11
ref/head 2024-12-01 17:59:08 +01:00
038853e4bb
shfmt 2024-12-01 17:47:06 +01:00
d549d03c99
shellcheck/write 2024-12-01 16:41:48 +01:00
482ba47dd9
file/write 2024-12-01 16:39:55 +01:00
48d7236451
mv 2024-12-01 16:23:53 +01:00
745e8f0a28
useless
All checks were successful
/ job (push) Successful in 1m16s
2024-11-30 00:12:01 +01:00
5fc07cfbc1
self/functions 2024-11-30 00:10:16 +01:00
245aa85f29
fix 2024-11-29 23:59:06 +01:00
317c71fe52
internal/log 2024-11-29 23:57:27 +01:00
fbb6e2bb68
shell/interactive 2024-11-29 23:56:14 +01:00
c032849e95
self/name 2024-11-29 23:52:46 +01:00
4325ab4776
sysroot 2024-11-29 23:49:09 +01:00
531aa618bb
shell/interactive 2024-11-29 23:41:57 +01:00
e4d0b71e5d
main/log 2024-11-29 23:36:32 +01:00
4b2cc9a243
core 2024-11-29 23:27:43 +01:00
d0bf0958c8
+core 2024-11-29 23:03:52 +01:00
9eefdb31f8
lint 2024-11-29 22:57:21 +01:00
c60ab4f5f5
self/help 2024-11-29 22:54:00 +01:00
5e8e84246d
fix 2024-11-29 22:28:09 +01:00
dc301be51d
main/name,path 2024-11-29 22:26:26 +01:00
8260e4e870
main/path 2024-11-29 22:22:12 +01:00
83a3a9d9ba
fixes 2024-11-29 22:20:34 +01:00
736fd791c2
fixes 2024-11-29 22:18:29 +01:00
2e622026cd
name/rwx 2024-11-29 22:04:00 +01:00
f9baa85fc7
usr/local/lib 2024-11-29 21:47:36 +01:00
eb9725a2c6
merge sh 2024-11-29 21:16:58 +01:00
3cdcac9885
readme/shell 2024-11-29 21:04:19 +01:00
377acbd817
−readme 2024-11-29 21:04:02 +01:00
c3240b8b15
−cs 2024-11-29 20:23:01 +01:00
2f686e3512
lint/shellcheck 2024-11-29 19:58:38 +01:00
a56aa8124f
gnome 2024-11-29 19:58:07 +01:00
dda61e2594
rescue/hetzner 2024-11-29 19:55:33 +01:00
4d64db0b70
rescue/ovh 2024-11-29 19:53:27 +01:00
a0d487f473
rescue/common 2024-11-29 19:51:23 +01:00
dc66287ed1
alias/overlay 2024-11-29 19:45:58 +01:00
ecff8f16bc
sc/ifs 2024-11-29 19:43:06 +01:00
de22cafbd0
main 2024-11-29 19:41:07 +01:00
903faba54e
main 2024-11-29 19:25:49 +01:00
4335005aac
util 2024-11-29 19:18:30 +01:00
d590bfda0c
shell 2024-11-29 19:14:38 +01:00
7b1e6b0fd5
log 2024-11-29 19:08:06 +01:00
1bae77cd6a
live 2024-11-29 19:04:39 +01:00
897a228614
debian 2024-11-29 19:04:20 +01:00
e811d73563
fs 2024-11-29 18:59:56 +01:00
7719b6a562
gpg 2024-11-29 18:57:41 +01:00
4ba9c94a42
gnome 2024-11-29 18:56:59 +01:00
04199bdfbb
rescue 2024-11-29 18:55:34 +01:00
f1192c0c58
shell/interactive 2024-11-29 18:48:21 +01:00
32b5389786
main/log 2024-11-29 18:46:52 +01:00
1e5451f059
main/source 2024-11-29 18:31:49 +01:00
24a623bd6e
fix 2024-11-29 17:46:09 +01:00
57da8c6212
lint 2024-11-29 17:21:19 +01:00
f25059d159
shfmt 2024-11-29 17:20:38 +01:00
68a4d51870
rwx/shellcheck 2024-11-29 17:16:56 +01:00
835f7339f3
rwx/help 2024-11-29 17:15:09 +01:00
75e7e2330d
rwx/main 2024-11-29 17:13:51 +01:00
6eec85df21
main/frames 2024-11-29 15:45:32 +01:00
b93a6909bb
comments 2024-11-29 15:42:58 +01:00
321070d5cc
+shfmt 2024-11-29 12:17:39 +01:00
1572a779ae
if interactive 2024-11-29 12:01:01 +01:00
eee9e38b7d
shell/interactive 2024-11-29 11:55:03 +01:00
05271ef828
members 2024-11-29 11:28:28 +01:00
4c862481f7
main/source_dir 2024-11-25 22:21:01 +01:00
ff077a039a
grep_functions 2024-11-25 21:00:14 +01:00
ff7f64e670
find/ext,sh 2024-11-25 20:46:09 +01:00
13e89092e4
public/find 2024-11-25 20:40:57 +01:00
586373ca3f
erroot 2024-11-25 18:51:24 +01:00
86be462cbe
−file 2024-11-25 18:48:22 +01:00
0e8cab41f6
shellcheck 2024-11-25 18:39:25 +01:00
839c8fa069
main/log 2024-11-25 18:33:23 +01:00
1bc166a046
empty 2024-11-25 18:30:35 +01:00
a8da17d196
main/logs 2024-11-25 18:25:13 +01:00
1507a935b9
help/log 2024-11-25 18:23:48 +01:00
47188ffedd
gt 2024-11-25 18:22:35 +01:00
80463e9213
logs 2024-11-25 18:20:08 +01:00
b9158be284
main 2024-11-25 18:09:03 +01:00
d048757efe
main/help 2024-11-25 17:57:41 +01:00
558c5d82c3
quote 2024-11-25 17:54:40 +01:00
df1fb4f343
env 2024-11-25 17:32:44 +01:00
25e7cc4f6c
loopback 2024-11-25 17:17:05 +01:00
ec8d1c113c
ifs/new,pop 2024-11-25 16:38:48 +01:00
678cf741c9
main/if 2024-11-25 16:31:59 +01:00
62b8f60841
main/count 2024-11-25 16:19:48 +01:00
df136cbad5
check/find 2024-11-25 15:33:18 +01:00
e9904f2965
main/name 2024-11-25 15:09:58 +01:00
8fb0750b59
except 2024-11-25 15:07:19 +01:00
51de08aaa3
source/find 2024-11-25 14:59:24 +01:00
d517b783d7
sort,shfmt 2024-11-25 14:52:47 +01:00
47f108f0a3
source/find 2024-11-25 14:45:16 +01:00
c68409c546
+sc 2024-11-25 14:27:23 +01:00
0eaebdf401
source 2024-11-25 14:16:23 +01:00
4b9f7df102
. 2024-11-25 14:07:38 +01:00
ae8aaec327
not output 2024-11-25 14:06:22 +01:00
84f6922b6f
check sourced 2024-11-25 13:56:01 +01:00
e029b00cae
useless 2024-11-25 13:31:34 +01:00
d2ee4678d7
source/check 2024-11-25 13:28:42 +01:00
35626d1104
−main/export 2024-11-25 13:23:09 +01:00
20ea46c5e4
shellcheck/sources 2024-11-25 13:21:23 +01:00
e6e446868d
main/lf 2024-11-25 13:16:24 +01:00
6eee35b3a4
−ovl/lxc 2024-11-25 13:03:00 +01:00
bb76a2f956
ovl/squash 2024-11-25 12:53:01 +01:00
c4b7796bb3
ovl/mirror 2024-11-25 12:52:21 +01:00
8490621281
ovl/cmd 2024-11-25 12:51:29 +01:00
0b2b2acb7b
ovl/bind 2024-11-25 12:50:43 +01:00
6b8da7e16b
ovl 2024-11-25 12:49:17 +01:00
a52d3595f7
prompt 2024-11-25 11:52:42 +01:00
0ed8b2486c
_sh_main 2024-11-21 11:25:40 +01:00
ee694a8fde
main/log 2024-11-20 16:47:41 +01:00
d691f67581
main/output 2024-11-20 15:48:10 +01:00
e305827808
mv 2024-11-20 14:47:30 +01:00
5ffc9fc840
shell_configure 2024-11-20 14:39:01 +01:00
cdc976db0b
shell_setup 2024-11-20 14:36:41 +01:00
942de1caed
colors 2024-11-20 14:29:42 +01:00
86db452e72
list_block_devices 2024-11-20 10:11:02 +01:00
510ca5a5b3
read_passphrase 2024-11-20 10:09:40 +01:00
6b45b885c7
not 2024-11-20 10:08:23 +01:00
c2a3a130d1
read_secret 2024-11-20 10:06:58 +01:00
4cf5783562
warn_wipe 2024-11-20 10:05:56 +01:00
96f0697e37
{} 2024-11-20 09:42:44 +01:00
dc0540c4ca
make_btrfs 2024-11-20 09:40:58 +01:00
844b2f21d3
btrfs_swap 2024-11-20 09:38:22 +01:00
beb4695b29
make_fat 2024-11-20 09:37:07 +01:00
1dfebbc35a
raid_create 2024-11-20 09:35:47 +01:00
ce6ca845bc
fs_wipe 2024-11-20 09:34:45 +01:00
c641c95c0d
luks_format 2024-11-20 09:31:53 +01:00
04f64f68a8
debian 2024-11-20 09:27:41 +01:00
aaa530295e
mv 2024-11-20 09:18:40 +01:00
321d55a823
sh_shell_prompt 2024-11-19 16:40:11 +01:00
aa1226f8f4
_sh_shell_color 2024-11-19 16:38:20 +01:00
f2544c4243
shell 2024-11-19 16:22:29 +01:00
9da45266c4
sh_shell 2024-11-19 16:22:07 +01:00
07483cdadf
sh_shell 2024-11-19 16:15:12 +01:00
8fae0bd63e
a__ 2024-11-19 14:42:11 +01:00
14e9e52362
main/log 2024-11-19 14:39:50 +01:00
838dbfc4f5
user 2024-11-19 14:33:03 +01:00
c8f6264f20
main/commands 2024-11-19 14:11:11 +01:00
a133acea99
main/log 2024-11-19 12:32:29 +01:00
ea17fc995a
prefix 2024-11-19 12:29:30 +01:00
d90f0fd6ef
_sh_log 2024-11-19 12:21:29 +01:00
7dfbb947ff
prefixes 2024-11-19 11:02:32 +01:00
bb08d4c5da
apt/backports 2024-11-19 10:46:30 +01:00
1ad055dfb4
apt/release 2024-11-19 10:45:49 +01:00
1a1679031e
apt/target 2024-11-19 10:41:16 +01:00
67510c2dee
apt/conf 2024-11-19 10:39:25 +01:00
c9c4aa9a6f
apt/clean 2024-11-19 10:37:35 +01:00
3c3f8ffeca
apt/sources 2024-11-19 10:36:35 +01:00
1016240483
apt/update 2024-11-19 10:33:56 +01:00
b02b2d183f
apt/upgrade 2024-11-19 10:25:22 +01:00
d8929dfd4c
sh/frontend 2024-11-19 10:24:05 +01:00
05e500c36a
frontend 2024-11-19 10:22:44 +01:00
fbe30920d7
codes 2024-11-19 09:58:15 +01:00
2089e8c1e0
errors 2024-11-19 09:52:38 +01:00
e33138bab4
auth_sock 2024-11-19 09:44:00 +01:00
0bbd7a68c1
home 2024-11-19 09:37:33 +01:00
e212c967b0
remount 2024-11-19 09:25:49 +01:00
58090332dd
b 2024-11-19 09:24:45 +01:00
07f5f9f4e9
gak,gau 2024-11-19 09:22:24 +01:00
46704e9e37
sa 2024-11-19 09:17:14 +01:00
bbcbcf28a2
hetzner 2024-11-18 23:24:14 +01:00
1061c309c3
readme 2024-11-18 22:33:59 +01:00
948e22d64f
read/-r 2024-11-18 22:22:12 +01:00
dce638fcbd
−? 2024-11-18 22:20:47 +01:00
d28e44097c
main/log 2024-11-18 20:33:14 +01:00
96db58083c
lsblk 2024-11-18 18:50:54 +01:00
ec16bff4b0
mv 2024-11-18 18:46:23 +01:00
39dedbd440
pgrep 2024-11-18 18:43:16 +01:00
31e52f9861
mv 2024-11-18 18:41:28 +01:00
441c42896b
grep 2024-11-18 18:29:57 +01:00
04a86e40ed
mv 2024-11-18 18:29:12 +01:00
e933c159c3
apt 2024-11-18 18:27:59 +01:00
9e80019ddd
mv 2024-11-18 18:20:49 +01:00
985d4f45a6
batcat 2024-11-18 16:57:19 +01:00
b6ffd72569
mv 2024-11-18 16:55:46 +01:00
dd4fd93e12
rsync 2024-11-18 16:53:12 +01:00
40e3b95aaf
m 2024-11-18 16:49:37 +01:00
6588da4ad6
tar 2024-11-18 16:43:42 +01:00
b13056034b
mv 2024-11-18 16:41:12 +01:00
95ea69c92f
killall 2024-11-18 16:38:17 +01:00
5e21bdec58
mv 2024-11-18 16:37:18 +01:00
0b4ac490cd
kill 2024-11-18 16:37:07 +01:00
e55392137c
mv 2024-11-18 16:35:44 +01:00
9974f0a99d
pwgen 2024-11-18 16:30:11 +01:00
81b1f9529c
mv 2024-11-18 16:28:41 +01:00
0f4bd2be85
mkdir 2024-11-18 16:27:41 +01:00
63efbb7028
mv 2024-11-18 16:25:25 +01:00
41ca1b08f8
ls 2024-11-18 16:24:54 +01:00
3108283a42
mv 2024-11-18 16:19:37 +01:00
12bc25233c
chown 2024-11-18 16:17:43 +01:00
d418c758d8
mv 2024-11-18 16:16:41 +01:00
ef0a7a6f28
chmod 2024-11-18 16:13:13 +01:00
4cbdeae4e9
mv 2024-11-18 16:11:50 +01:00
22c9a66162
m 2024-11-18 16:10:14 +01:00
6a7800e19e
cp 2024-11-18 16:08:55 +01:00
491dc1fa1c
tree 2024-11-18 15:39:27 +01:00
15dfd51681
mv 2024-11-18 15:38:27 +01:00
97e985f266
mvi 2024-11-18 15:36:57 +01:00
08179f386e
mv 2024-11-18 15:35:54 +01:00
743b82cb2d
cp 2024-11-18 15:35:18 +01:00
53957e5690
mv 2024-11-18 15:34:30 +01:00
b2df5a6eb5
clear 2024-11-18 15:33:44 +01:00
baa163b5b2
mv 2024-11-18 15:33:10 +01:00
dcc82f1cf7
rm 2024-11-18 15:31:30 +01:00
0f312f6c85
mv 2024-11-18 15:30:45 +01:00
63deee7326
emacs 2024-11-18 15:26:03 +01:00
9522c537b4
mv 2024-11-18 15:25:31 +01:00
be22e290f4
newsboat 2024-11-18 15:25:06 +01:00
8d01c89dc1
mv 2024-11-18 15:24:12 +01:00
078d3b783e
tmux 2024-11-18 15:23:25 +01:00
1ef0f04b07
mv 2024-11-18 15:22:47 +01:00
464d23cba3
pass 2024-11-18 15:19:29 +01:00
6d000b2ead
mv 2024-11-18 15:18:29 +01:00
7df87a0517
evince 2024-11-18 15:17:50 +01:00
c7430d275a
mv 2024-11-18 15:17:11 +01:00
75c3627d2c
byobu 2024-11-18 15:07:17 +01:00
ab50952317
mv 2024-11-18 14:46:59 +01:00
95df4c78e5
nano 2024-11-18 14:45:04 +01:00
f77081fd17
mv 2024-11-18 14:42:18 +01:00
92010392ae
git 2024-11-18 14:39:06 +01:00
aceca1fc69
btrfs 2024-11-18 14:35:14 +01:00
f96bcd9a9f
mv 2024-11-18 14:33:59 +01:00
ee10bfe04c
git 2024-11-18 14:31:15 +01:00
c46896293b
alias 2024-11-18 14:27:43 +01:00
ede62d14ef
gnome 2024-11-18 13:16:16 +01:00
ffe24a4c91
git 2024-11-18 13:15:46 +01:00
6ab26f5187
bsl 2024-11-18 12:41:54 +01:00
b380b2c0b0
gnome/proxy 2024-11-18 12:40:20 +01:00
d82805ff38
cmd 2024-11-18 12:38:15 +01:00
0cce49e919
btrfs 2024-11-18 12:32:57 +01:00
aae50d9bef
btrfs 2024-11-18 12:22:08 +01:00
b9804edd7a
gnome 2024-11-18 12:19:19 +01:00
eaaa9662cd
sh_log 2024-11-18 12:17:47 +01:00
69dac56a26
log 2024-11-18 12:15:29 +01:00
b68d4746e6
log/constants 2024-11-18 12:07:42 +01:00
3b0f3c14c1
primary 2024-11-18 12:05:20 +01:00
9a83206f3c
gpg 2024-11-18 12:03:15 +01:00
4d8be7e299
prefixes 2024-11-18 11:58:32 +01:00
b11bb1c60a
prefix 2024-11-18 11:54:27 +01:00
4931f47fe2
constants 2024-11-18 11:41:12 +01:00
7376790a30
sh 2024-11-17 22:31:13 +01:00
9910b4786b
sh.sh 2024-11-17 22:28:07 +01:00
02a743fc1b
sh 2024-11-17 22:27:38 +01:00
1084edee23
env 2024-11-17 22:27:05 +01:00
12515e6284
rsdb 2024-11-17 22:04:36 +01:00
0d3d0bc211
() 2024-11-17 21:46:01 +01:00
808d0dc064
nb 2024-11-17 19:34:08 +01:00
44c771534a
set 2024-11-17 19:23:24 +01:00
982a81adbe
1line 2024-11-17 19:10:18 +01:00
20f4af36d0
completions/git 2024-11-17 18:49:04 +01:00
8262f7c5d0
cmd 2024-11-17 18:17:06 +01:00
dcde6ddbc9
commands 2024-11-17 18:11:25 +01:00
3d5e4f5a68
sh 2024-11-17 17:40:02 +01:00
9b05b663da
shell 2024-11-17 17:36:25 +01:00
049eaaff6f
git 2024-11-17 17:29:15 +01:00
93a9ed20d5
gpg 2024-11-17 17:28:52 +01:00
cb3c7de641
2024-11-17 17:24:17 +01:00
7363e51f4e
gpg 2024-11-17 17:18:36 +01:00
18e2154931
format 2024-11-17 17:15:47 +01:00
bbff4013f3
functions 2024-11-17 17:14:15 +01:00
dcef6d2d62
2024-11-17 17:08:46 +01:00
975382a359
2024-11-17 17:05:44 +01:00
cfd529a5d8
rm 2024-11-17 17:03:30 +01:00
a9fa61d7a8
clean 2024-11-17 17:02:03 +01:00
237d34eef3
2024-11-17 16:59:22 +01:00
797b565940
−~ 2024-11-17 15:40:29 +01:00
33a638dbef
git 2024-11-17 14:20:55 +01:00
941adedaba
tasks 2024-11-17 14:19:41 +01:00
d24113e1b0
wip 2024-11-17 14:03:22 +01:00
03d4f4289c
gm 2024-11-17 13:59:52 +01:00
1bafe4d385
wip 2024-11-17 13:58:39 +01:00
f4b9f4780c
wip 2024-11-17 13:35:36 +01:00
a6e05017b7
gbsu 2024-11-17 13:23:38 +01:00
ae0807bf54
remote 2024-11-17 03:59:26 +01:00
a38610d0e9
agfu 2024-11-17 03:55:05 +01:00
bb90ce401b
fixes 2024-11-17 03:50:00 +01:00
7918a3c336
lt,ltt 2024-11-17 03:47:24 +01:00
df71c07296
l 2024-11-17 03:42:34 +01:00
29ac723242
agc 2024-11-17 03:32:58 +01:00
d34c068990
acl,acp,acs 2024-11-17 03:32:01 +01:00
f8ed45ad95
agap,agar 2024-11-17 03:25:02 +01:00
34b6b915f4
agi 2024-11-17 03:20:31 +01:00
a2efc15707
agp,agr 2024-11-17 03:18:15 +01:00
dde88afb21
agud,agug 2024-11-17 03:16:32 +01:00
cd4d7d3fcb
gcam,gcem 2024-11-17 03:09:36 +01:00
7e788e5940
commit 2024-11-17 03:07:23 +01:00
033999e9f6
gs,gsc 2024-11-17 02:58:43 +01:00
5f23aadfe5
tag 2024-11-17 02:55:45 +01:00
e5c43ae676
reset 2024-11-17 02:54:03 +01:00
79b5c724e4
remote 2024-11-17 02:53:03 +01:00
af70985d82
rebase,rm 2024-11-17 02:45:45 +01:00
5780c0ed18
gp,gpd,gpf 2024-11-17 02:31:52 +01:00
235202a64d
gma,gmc,gmf,gms,gmt 2024-11-17 02:26:32 +01:00
0eea7d052e
fix 2024-11-17 02:05:07 +01:00
5e9ae45748
%b 2024-11-17 01:32:34 +01:00
19b95e6061
\n 2024-11-17 01:31:06 +01:00
232f583be3
−sign 2024-11-16 21:49:50 +01:00
58578f9523
gl,gla,glap,glp 2024-11-16 20:27:36 +01:00
c2ce37595c
2024-11-16 19:18:00 +01:00
7a1320e108
gla,glb 2024-11-16 19:17:36 +01:00
d8de9913ce
gi,gib 2024-11-16 19:08:27 +01:00
beb479ba7c
ggc 2024-11-16 19:07:11 +01:00
7f814102e0
gf,gfp 2024-11-16 19:02:56 +01:00
5539baa340
gd,gdc,gdcw,gdt,gdw 2024-11-16 19:01:27 +01:00
c5185768b0
gcue,gcun 2024-11-16 18:54:56 +01:00
3554f0b905
gco,gcoo,gcp,gcpa,gcpc 2024-11-16 18:51:33 +01:00
a92770848e
gcf 2024-11-16 18:48:01 +01:00
1ddba59759
gb,gbd,gbdf,gbl,gbs 2024-11-16 18:43:09 +01:00
ecb6a686f2
gaap,gap 2024-11-16 17:01:12 +01:00
3360a7983d
ga,gaa 2024-11-16 16:59:23 +01:00
db596ce969
bpg 2024-11-16 16:55:31 +01:00
01b0224eee
bsc,bsd,bss,bssr 2024-11-16 16:53:19 +01:00
9312698f43
bfu 2024-11-16 16:49:41 +01:00
2acb0be68a
bfdf,bfdu 2024-11-16 16:48:48 +01:00
bd4fe3656e
m,remount 2024-11-16 16:45:07 +01:00
c68598931b
sh 2024-11-16 16:37:04 +01:00
6a49f4981a
−µ 2024-11-16 16:24:18 +01:00
dd801e188e
rsda,rsdb 2024-11-16 16:10:16 +01:00
ecb4005b0e
bases 2024-11-16 16:07:47 +01:00
a31401bd77
md,mdp 2024-11-16 16:02:25 +01:00
8d6b4884a1
fix 2024-11-16 15:59:57 +01:00
ea5bd6cfb2
gak,gau 2024-11-16 15:59:29 +01:00
ca0399d4f3
lb,lbc,lbo 2024-11-16 15:53:58 +01:00
5af5181aa4
ka,kaf 2024-11-16 15:42:21 +01:00
7ae9eb739a
k,kf 2024-11-16 15:40:17 +01:00
8df4abafca
tc,tl,tv,tx 2024-11-16 15:37:38 +01:00
ccf058440c
pg 2024-11-16 15:29:05 +01:00
259dbd11d1
pwg,pwgs 2024-11-16 15:26:30 +01:00
11fc443c8f
rmi 2024-11-16 15:22:14 +01:00
db65dea9dd
p,pc 2024-11-16 15:20:14 +01:00
449f1dadd8
nn 2024-11-16 15:18:41 +01:00
e2a59923af
tm 2024-11-16 15:17:36 +01:00
a2726f2f3b
byobu 2024-11-16 15:16:45 +01:00
c1f5176e25
em,g 2024-11-16 15:07:23 +01:00
03450c9ac7
evince 2024-11-16 15:04:04 +01:00
6df0543e89
newsboat 2024-11-16 15:02:40 +01:00
adddd9af3b
−otpclient 2024-11-16 14:59:54 +01:00
95f52f32eb
a,sd,x,..,... 2024-11-16 14:58:58 +01:00
e73163d2d3
shell 2024-11-16 14:41:35 +01:00
3c737f1928
cpi,µ,mvi 2024-11-16 14:40:28 +01:00
a5a9beff26
clear 2024-11-16 14:06:00 +01:00
524ddb8968
cor,cou 2024-11-16 14:04:50 +01:00
97389ceef7
cmd,cmf 2024-11-16 14:03:13 +01:00
895c169599
batcat 2024-11-16 14:00:55 +01:00
c7d3d72e62
tree/@ 2024-11-16 13:55:07 +01:00
e43429a683
tree 2024-11-16 13:53:18 +01:00
9d8772d716
−exception 2024-11-16 13:34:39 +01:00
3522a8a2f4
on purpose 2024-11-16 13:33:53 +01:00
0c6f8d6dd7
members 2024-11-16 13:31:52 +01:00
014ac219ac
list_block_devices 2024-11-16 13:25:02 +01:00
213f6ae1f1
warn_wipe 2024-11-16 13:22:55 +01:00
cafe6ab80b
${*} 2024-11-16 13:10:31 +01:00
1e6a8d5c2a
todo/() 2024-11-16 04:46:38 +01:00
9d4c32e34a
. 2024-11-16 04:45:44 +01:00
c03750a2f3
cr,cru 2024-11-16 04:34:35 +01:00
dc087a205b
ur 2024-11-16 04:28:32 +01:00
94746ca497
mr 2024-11-16 04:27:07 +01:00
58ca9eb86f
wip/mount 2024-11-16 04:23:54 +01:00
36aaa275a7
mo 2024-11-16 04:04:44 +01:00
2b807632b3
directories & files 2024-11-16 03:34:01 +01:00
964df6e8dc
fixes 2024-11-16 03:23:19 +01:00
5139c4367e
fixes 2024-11-16 03:21:30 +01:00
f366620418
−type 2024-11-16 02:55:41 +01:00
6eaab0b75f
fixes 2024-11-16 02:49:14 +01:00
e8dfd1b98a
useless 2024-11-16 02:44:04 +01:00
62ae8d73cc
wip/works 2024-11-16 02:43:06 +01:00
60adeb9f40
fixes 2024-11-16 02:32:58 +01:00
ce576b7a99
splits 2024-11-16 02:27:43 +01:00
ba3b90366b
wip/colors 2024-11-16 02:19:41 +01:00
347951cbdf
wip/shell_color 2024-11-16 01:54:13 +01:00
62a33a5583
wip/fixes 2024-11-16 01:41:42 +01:00
4cc5b8a502
wip/shell 2024-11-16 01:24:20 +01:00
e27dcc2eb3
readme 2024-11-16 01:23:33 +01:00
4d888d9784
−main_env_root 2024-11-15 19:38:54 +01:00
bc7b4962f6
-n 2024-11-15 19:29:10 +01:00
5ff98571f9
apt_conf_write 2024-11-15 19:24:48 +01:00
1d86226365
apt_sources_write 2024-11-15 19:23:33 +01:00
1a05b48cf5
−apt 2024-11-15 19:20:55 +01:00
9b5d0de840
fix 2024-11-15 19:11:16 +01:00
8c5b43a4e8
args 2024-11-15 19:10:40 +01:00
d7bf240ba0
main_source_ 2024-11-15 19:06:14 +01:00
6ce158712d
wip/path 2024-11-15 19:02:22 +01:00
ba5d740362
wip/user 2024-11-15 17:17:57 +01:00
4f6e6e7ba2
wip/hetzner 2024-11-15 17:07:19 +01:00
1486ff4246
wip/bash 2024-11-15 17:06:29 +01:00
b73663cf4b
wip/bash 2024-11-15 16:58:16 +01:00
52e7cf8f9c
wip/default 2024-11-15 16:43:48 +01:00
f52abc28b3
wip/shell 2024-11-15 16:27:41 +01:00
672b385447
wip/env 2024-11-15 16:26:54 +01:00
05710e7ef7
rescue/ 2024-11-14 00:07:05 +01:00
00183fecc1
. 2024-11-13 15:01:02 +01:00
8982496082
count 2024-11-13 14:55:20 +01:00
216fe057c9
echoes 2024-11-13 14:38:35 +01:00
6603c88198
raids 2024-11-13 14:30:50 +01:00
2722134a0f
raid_create 2024-11-13 14:24:58 +01:00
8d53e86bcd
devices 2024-11-13 14:00:10 +01:00
d028d83f7a
number 2024-11-13 13:54:13 +01:00
87c53a18ba
lint 2024-11-13 13:14:58 +01:00
818f48d92f
-n 2024-11-13 13:10:19 +01:00
c4e9f06cb2
stty 2024-11-13 13:08:09 +01:00
3b062767c3
log 2024-11-13 12:55:14 +01:00
458e4b60f6
relative 2024-11-13 12:50:49 +01:00
2a568eeb22
ifs 2024-11-13 12:41:37 +01:00
dae14f780e
log/prefix 2024-11-13 12:08:04 +01:00
f332104d12
main_get_root 2024-11-13 12:03:00 +01:00
28330ca3c8
path,root 2024-11-13 11:57:56 +01:00
7398fa0726
rc/. 2024-11-13 11:55:48 +01:00
76225ff815
quote 2024-11-13 11:43:12 +01:00
a6e63a6722
shfmt 2024-11-13 11:34:59 +01:00
39fdabd885
. 2024-11-13 11:24:51 +01:00
c22e6d18ce
source 2024-11-13 11:21:37 +01:00
8f81cb4455
realpath 2024-11-13 10:40:27 +01:00
0cc06b6de0
shfmt 2024-11-13 09:43:27 +01:00
e8c65c9821
users 2024-11-13 09:41:47 +01:00
40c151d69e
main/readlink 2024-11-13 09:30:59 +01:00
010cb76003
_shell_ 2024-11-13 09:11:24 +01:00
b557ddde70
formats 2024-11-12 23:36:20 +01:00
c4f68fc29b
fix 2024-11-12 23:32:36 +01:00
5e800b713d
args 2024-11-12 23:32:14 +01:00
7bce373af6
2024-11-12 23:27:19 +01:00
6be681d0fb
luks_format 2024-11-12 23:13:45 +01:00
799732c8ef
swaps 2024-11-12 22:59:49 +01:00
4590c5cda6
fs_make_btrfs_swap 2024-11-12 22:52:21 +01:00
7611ee6103
btrfs 2024-11-12 22:47:18 +01:00
fdffd7fb08
fs_make_btrfs 2024-11-12 22:38:38 +01:00
378e0e530f
wipes 2024-11-12 20:22:58 +01:00
3b2df8f8a0
fs_wipe 2024-11-12 20:13:32 +01:00
dfe3be4f1c
fat 2024-11-12 20:03:47 +01:00
5cf0d4021e
partitions 2024-11-12 19:45:47 +01:00
11c131e849
nano 2024-11-12 10:29:09 +01:00
0dfc4d99ed
read 2024-11-12 10:27:50 +01:00
a4ed6cdbdb
fixes 2024-11-12 10:25:44 +01:00
88162d22fe
prompt 2024-11-12 10:18:44 +01:00
663d99bb14
lxc 2024-11-12 10:15:58 +01:00
8b39df8ed0
main,proxy 2024-11-12 10:14:08 +01:00
fbfb4c27e6
mount 2024-11-12 10:11:35 +01:00
44adf7cc8f
socks 2024-11-12 10:00:55 +01:00
d3bfa52eda
ps1 2024-11-12 09:59:53 +01:00
373b40dcf1
ps2 2024-11-12 09:56:52 +01:00
3a2a6a483c
main 2024-11-12 09:51:58 +01:00
6267af5ef8
proxy 2024-11-12 09:50:58 +01:00
d7e2f15257
function 2024-11-12 09:49:47 +01:00
3b979057c1
mount 2024-11-12 09:46:29 +01:00
6840588cd5
fixes 2024-11-12 09:43:56 +01:00
4e81f18817
quotes 2024-11-12 09:35:29 +01:00
305968a9e6
noninteractive 2024-11-12 09:31:24 +01:00
fe5c75b142
passphrase 2024-11-12 09:28:08 +01:00
671beb4b0e
history 2024-11-12 07:59:50 +01:00
195b185f6e
completion 2024-11-12 07:58:17 +01:00
976cb6e919
fixes 2024-11-12 07:44:21 +01:00
f163abbd37
bool 2024-11-12 07:29:36 +01:00
9da2ddeb6f
ws 2024-11-12 07:28:41 +01:00
95828fe06c
log 2024-11-12 07:20:25 +01:00
3d784b81c4
ws 2024-11-12 06:52:21 +01:00
304d163d74
ws 2024-11-12 06:43:20 +01:00
b37e4abc4e
not 2024-11-12 06:42:16 +01:00
abb6ed3a26
bsl 2024-11-12 06:30:26 +01:00
763d199cde
gpg_ssh 2024-11-12 06:26:59 +01:00
68d5c0b51a
local 2024-11-12 06:26:24 +01:00
084c92e50a
install 2024-11-12 06:03:36 +01:00
918090d9be
mapper 2024-11-11 22:21:17 +01:00
dbf1295148
fixes 2024-11-11 22:16:37 +01:00
c2d83e717f
error 2024-11-11 21:08:52 +01:00
7c8f2d8f49
apt_update 2024-11-11 20:42:37 +01:00
cc7e1cafb4
apt_upgrade 2024-11-11 20:40:56 +01:00
e139ac7758
apt_clean 2024-11-11 20:37:25 +01:00
a6180ecd65
log 2024-11-11 20:33:23 +01:00
9b9e503225
.shellcheckrc 2024-11-11 20:30:11 +01:00
9f550c4412
functions 2024-11-11 18:06:27 +01:00
c4fcfbdca2
zero 2024-11-11 18:02:21 +01:00
6b81ee0a5a
close 2024-11-11 17:59:03 +01:00
ddde3e3c6b
upload 2024-11-11 17:56:25 +01:00
98c121d837
install 2024-11-11 17:52:34 +01:00
d3a510ab38
shebang 2024-11-11 17:34:32 +01:00
d11ab01afe
configure 2024-11-11 17:33:55 +01:00
ef87d4d410
parted/ovh 2024-11-11 17:21:21 +01:00
1f9ba3b19d
parted 2024-11-11 17:19:05 +01:00
6419243098
shfmt 2024-11-11 17:14:04 +01:00
5776a03fe4
indent 2024-11-11 17:02:08 +01:00
bf1e7539fa
tabs 2024-11-11 17:01:19 +01:00
783d5e334e
functions 2024-11-11 16:57:37 +01:00
5f13535022
hetzner 2024-11-11 16:56:00 +01:00
33e823024c
ovh 2024-11-11 16:48:26 +01:00
7687037070
rescue 2024-11-11 16:43:16 +01:00
8983b9cd9f
rename 2024-11-11 16:42:18 +01:00
63af101db9
indent 2024-11-11 16:38:48 +01:00
566189cc80
functions 2024-11-11 16:37:27 +01:00
28e3acd8a7
device 2024-11-11 15:40:04 +01:00
bee3710cde
upload 2024-11-11 14:40:55 +01:00
c7659c47fa
packages 2024-11-11 14:32:37 +01:00
0face50a52
echoes 2024-11-11 14:04:48 +01:00
8ab6d5758d
install 2024-11-11 14:03:33 +01:00
d2ce7a1b74
configure 2024-11-11 13:58:49 +01:00
d468491ae0
_ 2024-11-11 13:32:08 +01:00
b693e17e29
printf 2024-11-11 13:27:51 +01:00
48e29b9e60
packages 2024-11-11 13:26:01 +01:00
91b0862539
tmux 2024-11-11 13:13:25 +01:00
cb02b15146
release 2024-11-11 13:11:27 +01:00
dce03fc9b9
bookworm 2024-11-11 13:05:39 +01:00
9b830a7d36
packages 2024-11-11 12:55:45 +01:00
718d1d1e78
tmux,cleans 2024-11-11 12:46:43 +01:00
efada1fce5
quotes 2024-11-11 12:38:32 +01:00
3b05dfecc4
indents 2024-11-11 12:37:07 +01:00
801f3b859c
indent 2024-11-11 12:32:13 +01:00
0ffbf27412
arrays 2024-11-11 12:29:48 +01:00
6f17ecfec3
quoootes 2024-11-11 12:17:52 +01:00
cc8ca58cff
rescue/bash 2024-11-11 11:57:19 +01:00
d2ba729c13
btrfs/bsl 2024-04-01 13:52:51 +02:00
074d9d5a73
no gpg agent 2024-03-31 23:35:16 +02:00
75ff649291 tree/t,ta 2024-03-15 12:24:07 +01:00
2765d87386 ls/di 2024-03-15 12:15:57 +01:00
8e7f6b291d bash/alias 2024-02-28 10:58:41 +01:00
5b750c894b hetzner mdadm md: 2024-02-11 21:52:22 +01:00
7cb8f74214 lsblk/label 2024-01-21 11:47:18 +01:00
fad8ddc7e2 btrfs/bsd 2024-01-20 23:40:49 +01:00
807d4b480d ms/noappend 2024-01-05 16:22:23 +01:00
67e7b951bd default squashfs block size 2024-01-05 16:19:16 +01:00
500977a716 alias/btrfs 2024-01-05 09:49:18 +01:00
2b654b58f3 dhu/crypt 2024-01-05 09:38:25 +01:00
b272ea2181 md/sort 2024-01-01 11:51:31 +01:00
fb02c72976 md/boot 2024-01-01 11:37:44 +01:00
18fa2453ea − 12-10-10 2023-12-29 16:12:58 +01:00
e6d6487010 btrfs/compress-force 2023-12-29 14:11:56 +01:00
f806069845 / 2023-12-29 09:48:24 +01:00
382d0489d9 esp/mount 2023-12-29 09:39:42 +01:00
ca3dc0c2a8 duperemove 2023-12-29 08:10:41 +01:00
5a76c09cb1 functions 2023-12-28 17:18:17 +01:00
c31db13ebf close 2023-12-28 13:00:10 +01:00
d8f56b869c boot/mount 2023-12-28 12:56:24 +01:00
f8f5bb623d crypt/mkswapfile 2023-12-28 12:49:44 +01:00
ac69623ed3 crypt/mount 2023-12-28 12:44:00 +01:00
2b1610bbe6 crypt/btrfs 2023-12-28 12:40:43 +01:00
5ab4a0054a swap 2023-12-28 12:06:27 +01:00
f571ad3307 − lvm 2023-12-28 12:04:51 +01:00
02f2f5323c standalone wipe 2023-12-28 12:00:25 +01:00
cbabed2017 dd/bs 2023-12-28 11:58:57 +01:00
58829f7045 uuid 2023-12-28 11:58:29 +01:00
b053c65680 esp/uuid 2023-12-28 11:26:30 +01:00
874dd04672 mkfs 2023-12-28 10:01:15 +01:00
c00ceaacaf parted 2023-12-28 09:23:03 +01:00
9e9434e8e0 8-8-0,8-8-1 2023-12-28 08:36:46 +01:00
a31d85f16a emacs 2023-12-13 12:31:13 +01:00
a98be0588f swap/128 2023-10-04 08:36:02 +02:00
abc7186d57 close 2023-10-04 08:24:22 +02:00
f796532025 head 2023-10-03 11:46:51 +02:00
10aa0b80b5 4,3,2 2023-10-03 11:43:10 +02:00
6f752c3afc esp/bs 2023-10-03 11:39:34 +02:00
afc8c6c833 hostname 2023-10-03 11:07:38 +02:00
71f0ef0856 crypt 2023-10-03 10:11:41 +02:00
3972d3ce39 split 2023-10-03 10:05:29 +02:00
7cbe78dbc6 data 2023-10-03 09:59:55 +02:00
cf4d945350 swap 2023-10-03 09:58:47 +02:00
969734c4cd lv 2023-10-03 09:57:39 +02:00
d969810396 pv,vg 2023-10-03 09:55:08 +02:00
d58afc8226 open,close 2023-10-03 09:54:01 +02:00
eeda17878a cryptsetup 2023-10-03 09:52:33 +02:00
8fbfabb388 passphrase 2023-10-03 09:50:47 +02:00
f4cda4c096 boot 2023-10-03 09:46:44 +02:00
f71653e290 members 2023-10-03 09:44:16 +02:00
a5cf152c80 extra 2023-10-03 05:44:42 +02:00
1624f18fc8 cut 2023-10-03 05:38:26 +02:00
3ac8efc19d boot 2023-10-03 05:29:11 +02:00
74a27a077c number 2023-10-03 05:18:39 +02:00
d9c6a67d40 esp 2023-10-03 05:15:38 +02:00
adcc61b377 bios 2023-10-03 05:11:55 +02:00
0c2df7cb6d bios 2023-10-03 05:09:15 +02:00
e36e590799 esp 2023-10-03 05:05:05 +02:00
6bd52d184e boot 2023-10-03 05:02:34 +02:00
22f0f463df crypt 2023-10-03 05:01:14 +02:00
7905892e59 number,mktable 2023-10-03 04:32:23 +02:00
4514296ee4 device,devices 2023-10-03 04:20:24 +02:00
63b62a6f09 wipe 2023-10-03 04:18:00 +02:00
34ead4eb5d .bashrc 2023-10-02 21:19:27 +02:00
0606d17293 ipcalc 2023-10-02 21:07:51 +02:00
2fde68b230 screen,tmux 2023-10-02 21:06:25 +02:00
8dbf695233 installed 2023-10-02 21:03:30 +02:00
34640e9183 py3 2023-10-02 19:51:47 +02:00
f6c861e0d9 install 2023-10-02 19:50:29 +02:00
7fe64724c2 nano,vim 2023-10-02 19:46:19 +02:00
ab50c39bbb installed 2023-10-02 19:45:03 +02:00
7a2d2e3f7e echo 2023-10-02 19:39:41 +02:00
23c14ff966 apt-file 2023-10-02 19:35:18 +02:00
e458a78afe package 2023-10-02 19:32:50 +02:00
e692555334 sha3 2023-10-02 19:13:23 +02:00
3ff07ed461 dosfstools 2023-10-02 19:11:39 +02:00
237953e785 btrfs-progs 2023-10-02 19:05:58 +02:00
67580388fa git 2023-10-02 18:58:03 +02:00
b6b923e1dd rsync 2023-10-02 18:54:34 +02:00
ad4b5f7e6c cryptsetup-bin 2023-10-02 18:53:11 +02:00
3c0a753049 uuid-runtime 2023-10-02 18:51:36 +02:00
5243263397 lf 2023-10-02 18:49:48 +02:00
76e8b3af28 tree 2023-10-02 18:49:10 +02:00
8013de8704 lsof 2023-10-02 18:46:35 +02:00
4415132cfd htop 2023-10-02 18:45:30 +02:00
6cf84b81b3 file 2023-10-02 18:44:13 +02:00
9b873d35f2 hetzner/bookworm 2023-10-02 18:42:39 +02:00
dcf5282721 −fix 2023-10-02 18:35:16 +02:00
dee85aab3b hetzner/bookworm 2023-10-02 18:28:25 +02:00
0e8ea7af97 hetzner/function 2023-10-02 18:16:32 +02:00
90b5440f13 hetzner/cp 2023-10-02 17:30:04 +02:00
0daec8e9d4 gpg/gak,gau 2023-08-28 12:41:27 +02:00
003d02f226 gsettings/ws 2023-08-21 14:32:38 +02:00
0b960f7fba space 2023-08-21 11:46:21 +02:00
e876f37b7d bash/prompt/enhance 2023-08-21 11:43:50 +02:00
8afbad6e4c bash/ps2 2023-08-20 19:41:54 +02:00
0db196a41c −real 2023-08-20 18:50:17 +02:00
ffb301e21b bash/ps1/real 2023-08-20 18:39:36 +02:00
0b7e362582 bash/ps1 2023-08-20 18:33:26 +02:00
633f42b6c2 bash/prompt 2023-08-20 13:55:12 +02:00
52a93c61cc bash/prompt 2023-08-18 21:14:34 +02:00
fde55c7c04 gpg agent if configuration 2023-07-19 22:08:40 +02:00
97f74cb623 cs.old 2023-07-11 09:12:32 +02:00
7ffcea4b84 mv 2023-07-11 09:09:33 +02:00
53a2299f34 bash/main/import/exit 2023-06-19 15:16:05 +02:00
25a8c2f30b sort bash modules 2023-06-19 15:08:06 +02:00
6455d789aa ... 2023-05-20 09:18:21 +02:00
275b8bdf2c hostname 2023-05-19 20:14:13 +02:00
755e938876 µ,n 2023-05-18 14:48:29 +02:00
66b925e0a2 pwgen/pwg,pwgs 2023-05-18 14:29:49 +02:00
d5e81ff9c3 otp 2023-05-18 14:19:29 +02:00
8bc91cc00b git/gmc,grm 2023-05-18 13:51:20 +02:00
a35d7da975 \ 2023-05-18 13:25:21 +02:00
57c4d58631 sd 2023-05-18 13:24:21 +02:00
7358508a93 cpi 2023-05-18 13:23:12 +02:00
70006908fe mvi 2023-05-18 13:20:30 +02:00
d7bee96329 git/clone,commit 2023-05-18 12:34:05 +02:00
3e924813c8 account→a 2023-05-17 16:24:01 +02:00
b54d423f87 mm/make-rslave,rbind um/recursive 2023-05-16 18:26:21 +02:00
3b71c87e03 apt_clean_cache 2023-05-15 21:23:36 +02:00
060287a127 todo/ffmpeg 2023-05-15 21:13:48 +02:00
3092524d58 evince 2023-05-15 21:12:20 +02:00
9609171ad6 path 2023-05-15 18:59:04 +02:00
80f19583ce path 2023-05-15 18:56:12 +02:00
3ffc60e4f1 main/file 2023-05-15 18:41:02 +02:00
b170098755 ovh-rescue-configure 2023-05-15 12:20:00 +02:00
3fc442bf70 main_link_bashrc 2023-05-15 12:07:16 +02:00
4c7ad425b2 main_bash 2023-05-15 09:19:43 +02:00
04ccbd37c4 gc/message 2023-05-15 09:02:33 +02:00
abe546de10 gpg 2023-05-15 09:01:00 +02:00
d2eb5dd011 after 2023-05-14 23:31:26 +02:00
4f043326ee log modules 2023-05-14 23:24:40 +02:00
ffdc0c74e1 mount 2023-05-14 23:12:22 +02:00
e9694b0c17 gs 2023-05-14 22:58:58 +02:00
ca65005707 gc 2023-05-14 22:56:05 +02:00
3911f08261 gap 2023-05-14 22:48:39 +02:00
e6d67ac56e gl 2023-05-14 22:47:03 +02:00
afac1464dc gm 2023-05-14 22:29:47 +02:00
ad467c223c gi 2023-05-14 22:18:05 +02:00
db5874722a gcu 2023-05-14 22:16:55 +02:00
64c39902a6 gd 2023-05-14 22:15:44 +02:00
4a500e83ac gco 2023-05-14 19:49:34 +02:00
a8d4d6373e gcp 2023-05-14 18:57:15 +02:00
81616ae770 gf 2023-05-14 18:55:39 +02:00
8a99b9e1b7 gp 2023-05-14 18:53:19 +02:00
c41c49c30d grb 2023-05-14 18:50:19 +02:00
ab2d3d9141 grm 2023-05-14 18:17:18 +02:00
e93728cdc5 grs 2023-05-14 18:11:10 +02:00
6b4410052b gt 2023-05-14 18:07:01 +02:00
9017b8d905 gc,gcf 2023-05-14 18:04:13 +02:00
26b40b3bd0 gb 2023-05-14 17:59:03 +02:00
ac2f69eea8 ga 2023-05-14 17:56:00 +02:00
c89a269e78 prune 2023-05-14 17:10:44 +02:00
9bd2c799a0 ggc 2023-05-14 17:08:10 +02:00
7557c5b2cc ggc 2023-05-14 16:58:37 +02:00
2c8add321a apt 2023-05-14 16:54:43 +02:00
bb55e1f358 bash 2023-05-14 16:38:54 +02:00
42cefc7a49 batcat 2023-05-14 16:36:36 +02:00
4f362fa0c4 byobu 2023-05-14 16:35:32 +02:00
dbd9da9cd8 chmod 2023-05-14 16:31:09 +02:00
6f3ed66c06 chown 2023-05-14 16:30:24 +02:00
81dc60be1c clear 2023-05-14 16:29:21 +02:00
b541f2021d grep 2023-05-14 16:28:45 +02:00
69d9784679 kill,killall 2023-05-14 16:26:24 +02:00
e26343e222 ovh/micro 2023-05-14 16:24:24 +02:00
e6089c1624 micro 2023-05-14 16:19:33 +02:00
038ee0cbf3 mkdir 2023-05-14 16:19:10 +02:00
5d07b3c14a newsboat 2023-05-14 16:18:31 +02:00
39f7ca123d otpclient-cli 2023-05-14 16:17:53 +02:00
f271a456fd pass 2023-05-14 16:11:50 +02:00
cfc99b0cd7 ps 2023-05-14 16:10:49 +02:00
4930c7bd04 rsync 2023-05-14 16:09:23 +02:00
22077fad31 tar 2023-05-14 16:06:24 +02:00
b5761c429b alias/bash 2023-05-14 16:01:12 +02:00
4ce6077f23 alias 2023-05-14 16:00:34 +02:00
2520fbee34 log 2023-05-14 15:51:38 +02:00
5433ef186a modules 2023-05-14 14:46:23 +02:00
6818171cbc bash/commands,completion,history,prompt 2023-05-14 14:01:41 +02:00
1f44f63093 import modules 2023-05-14 13:59:46 +02:00
b07230a6a1 recursive 2023-05-14 13:57:53 +02:00
248bbae91b lsblk 2023-05-14 13:45:02 +02:00
e25bf7bbfb l 2023-05-14 13:33:51 +02:00
45127eab10 readme 2023-05-14 12:07:22 +02:00
07961df4c9 todo 2023-05-14 11:55:08 +02:00
b9949d107c debian disable frontend 2023-05-14 11:51:45 +02:00
515d64bc2a debian/frontend 2023-05-14 11:48:35 +02:00
b14f4c2f27 readme 2023-05-14 11:46:49 +02:00
f4f5eb31c9 send keys to install 2023-05-13 11:30:41 +02:00
76d233d4f7 byobu,mosh 2023-05-13 04:08:37 +02:00
9cfd4aa889 hostname 2023-05-13 03:44:57 +02:00
e017ce2785 force format boot 2023-05-13 03:42:00 +02:00
c301758e1c read prompt 2023-05-13 03:36:05 +02:00
63bb37330a wipe-lsblk,hostname 2023-05-13 03:28:08 +02:00
65f9d3b249 read raw 2023-05-13 03:23:05 +02:00
b7b590a97c read secret 2023-05-13 03:21:41 +02:00
9166e6ff45 passphrase 2023-05-13 03:18:59 +02:00
1f75f16a73 bba,bbn 2023-05-13 03:08:07 +02:00
7354deeee2 bbl 2023-05-13 03:06:40 +02:00
6786a4ea2f comment,rejigger 2023-05-13 03:05:57 +02:00
b5c4c51ced hostname 2023-05-13 02:59:00 +02:00
0d11ca4ee4 setup link 2023-05-13 02:56:03 +02:00
76f16debb1 install 2023-05-13 02:54:16 +02:00
e017d1a5b7 parted,mdadm,lvm2,lsof 2023-05-13 02:41:10 +02:00
df61ae9d80 lshw 2023-05-13 02:27:29 +02:00
7fc49d3dd0 ovh-rescue-wipe 2023-05-13 02:26:42 +02:00
1c05cd488e lbo 2023-05-13 01:59:08 +02:00
a4e9584ae1 ovh-rescue 2023-05-13 00:49:39 +02:00
dd1ee57228 link bashrc 2023-05-12 23:38:42 +02:00
7f1ade34d0 bash/tl 2023-05-10 09:45:19 +02:00
74c01068b4 gnupg/root 2023-05-10 00:27:50 +02:00
b52612afed gpg/ssh,tty 2023-05-09 23:32:24 +02:00
06f5191c7c bash 2023-05-09 23:25:21 +02:00
3343762acc FILE 2023-05-09 22:58:36 +02:00
7bb0eeecf1 remount 2023-05-09 22:20:42 +02:00
98056f2fb6 source directly 2023-05-09 22:15:40 +02:00
247b6a7fed main 2023-05-09 22:10:18 +02:00
a4697a41fa source bash relatively 2023-05-09 22:09:01 +02:00
596e9b86c2 bash.d 2023-05-09 22:02:34 +02:00
3ed56f6453 bash.bashrc 2023-05-09 22:01:32 +02:00
e221bf5dfd remount 2023-05-09 21:56:21 +02:00
8d7b4f3a9c nbdcs 2023-05-09 21:56:16 +02:00
817924687a 2023-05-09 21:42:28 +02:00
50 changed files with 2334 additions and 0 deletions

4
.shellcheckrc Normal file
View file

@ -0,0 +1,4 @@
disable=3043
enable=all
external-sources=true
shell=sh

View file

@ -51,6 +51,8 @@ A tiny framework to read, write & execute things.
### Task stack
#### Python
* character constants for box drawing
* common __str__ function
* parse pyproject.toml to write commands
@ -59,3 +61,14 @@ A tiny framework to read, write & execute things.
* system commands to run
* with single call of subprocess.run
* or alternate subprocess method?
#### Shell
* git switch signing commits & tags
* shellcheck & shfmt
* python tools
* log
* hetzner
* apt
* apt-file search | grep
* ffmpeg

95
sh/alias/apt.sh Normal file
View file

@ -0,0 +1,95 @@
# show package information
acl() { a__apt_cache_list "${@}"; }
a__apt_cache_list() {
apt-cache \
show \
"${@}"
}
# package versions policy
acp() { a__apt_cache_policy "${@}"; }
a__apt_cache_policy() {
apt-cache \
policy \
"${@}"
}
# search package
acs() { a__apt_cache_search "${@}"; }
a__apt_cache_search() {
apt-cache \
search \
"${@}"
}
#
agap() { a__apt_get_auto_purge "${@}"; }
a__apt_get_auto_purge() {
apt-get \
autopurge \
"${@}"
}
#
agar() { a__apt_get_auto_remove "${@}"; }
a__apt_get_auto_remove() {
apt-get \
autoremove \
"${@}"
}
# clean packages cache
agc() { a__apt_get_clean "${@}"; }
a__apt_get_clean() {
apt-get \
clean \
"${@}"
}
# upgrade allowing package installation or removal
agfu() { a__apt_get_full_upgrade "${@}"; }
a__apt_get_full_upgrade() {
apt-get \
full-upgrade \
"${@}"
}
# install packages
agi() { a__apt_get_install "${@}"; }
a__apt_get_install() {
apt-get \
install \
"${@}"
}
#
agp() { a__apt_get_purge "${@}"; }
a__apt_get_purge() {
apt-get \
purge \
"${@}"
}
#
agr() { a__apt_get_remove "${@}"; }
a__apt_get_remove() {
apt-get \
remove \
"${@}"
}
# update packages catalog
agud() { a__apt_get_up_date "${@}"; }
a__apt_get_up_date() {
apt-get \
update \
"${@}"
}
# upgrade forbidding package installation or removal
agug() { a__apt_get_up_grade "${@}"; }
a__apt_get_up_grade() {
apt-get \
upgrade \
"${@}"
}

5
sh/alias/batcat.sh Normal file
View file

@ -0,0 +1,5 @@
b() { a__bat "${@}"; }
a__bat() {
batcat \
"${@}"
}

73
sh/alias/btrfs.sh Normal file
View file

@ -0,0 +1,73 @@
bfdf() { a__btrfs_filesystem_d_f "${@}"; }
a__btrfs_filesystem_d_f() {
btrfs \
filesystem \
df \
"${@}"
}
bfdu() { a__btrfs_filesystem_d_u "${@}"; }
a__btrfs_filesystem_d_u() {
btrfs \
filesystem \
du \
--summarize \
"${@}"
}
bfu() { a__btrfs_filesystem_usage "${@}"; }
a__btrfs_filesystem_usage() {
btrfs \
filesystem \
usage \
"${@}"
}
bpg() { a__btrfs_property_get "${@}"; }
a__btrfs_property_get() {
btrfs \
property \
get \
"${@}"
}
bsc() { a__btrfs_subvolume_create "${@}"; }
a__btrfs_subvolume_create() {
btrfs \
subvolume \
create \
"${@}"
}
bsd() { a__btrfs_subvolume_delete "${@}"; }
a__btrfs_subvolume_delete() {
btrfs \
subvolume \
delete \
"${@}"
}
bsl() { a__btrfs_subvolume_list "${@}"; }
a__btrfs_subvolume_list() {
if [ -n "${1}" ]; then
btrfs subvolume list "${1}" |
cut --delimiter " " --fields 9 |
sort
fi
}
bss() { a__btrfs_subvolume_snapshot "${@}"; }
a__btrfs_subvolume_snapshot() {
btrfs \
subvolume \
snapshot \
"${@}"
}
bssr() { a__btrfs_subvolume_snapshot_r "${@}"; }
a__btrfs_subvolume_snapshot_r() {
btrfs \
subvolume \
snapshot -r \
"${@}"
}

27
sh/alias/byobu.sh Normal file
View file

@ -0,0 +1,27 @@
bb() { a__byo_bu "${@}"; }
a__byo_bu() {
byobu \
"${@}"
}
bba() { a__byo_bu_attach "${@}"; }
a__byo_bu_attach() {
byobu \
attach-session \
"${@}"
}
bbl() { a__byo_bu_ls "${@}"; }
a__byo_bu_ls() {
byobu \
ls \
"${@}"
}
bbnd() { a__byo_bu_new_detach "${@}"; }
a__byo_bu_new_detach() {
byobu \
new-session \
-d \
"${@}"
}

15
sh/alias/chmod.sh Normal file
View file

@ -0,0 +1,15 @@
# change mode to directory
cmd() { a__change_mode_directory "${@}"; }
a__change_mode_directory() {
chmod \
"755" \
"${@}"
}
# change mode to file
cmf() { a__change_mode_file "${@}"; }
a__change_mode_file() {
chmod \
"644" \
"${@}"
}

15
sh/alias/chown.sh Normal file
View file

@ -0,0 +1,15 @@
# change owner to root
cor() { a__change_owner_root "${@}"; }
a__change_owner_root() {
chown \
"0:0" \
"${@}"
}
# change owner to user
cou() { a__change_owner_user "${@}"; }
a__change_owner_user() {
chown \
"1000:1000" \
"${@}"
}

6
sh/alias/clear.sh Normal file
View file

@ -0,0 +1,6 @@
# clear terminal
c() { a__clear "${@}"; }
a__clear() {
clear \
"${@}"
}

7
sh/alias/cp.sh Normal file
View file

@ -0,0 +1,7 @@
# copy interactively
cpi() { a__co_py_interactive "${@}"; }
a__co_py_interactive() {
cp \
--interactive \
"${@}"
}

5
sh/alias/emacs.sh Normal file
View file

@ -0,0 +1,5 @@
em() { a__e_macs "${@}"; }
a__e_macs() {
emacs \
"${@}"
}

5
sh/alias/evince.sh Normal file
View file

@ -0,0 +1,5 @@
ev() { a__e_vince "${@}"; }
a__e_vince() {
evince \
"${@}"
}

548
sh/alias/git.sh Normal file
View file

@ -0,0 +1,548 @@
RWX_GIT_LOG_FORMAT="\
%C(auto)%h%d
S %C(red)%GS
A %C(green)%an %ae
%C(green)%ai
C %C(blue)%cn %ce
%C(blue)%ci
%B"
# add to index
ga() { a__git_add "${@}"; }
a__git_add() {
git \
add \
"${@}"
}
# add all to index
gaa() { a__git_add_all "${@}"; }
a__git_add_all() {
git \
add \
--all \
"${@}"
}
# add parts of all to index
gaap() { a__git_add_all_patch "${@}"; }
a__git_add_all_patch() {
git \
add \
--all \
--patch \
"${@}"
}
# add parts to index
gap() { a__git_add_patch "${@}"; }
a__git_add_patch() {
git \
add \
--patch \
"${@}"
}
# create a branch
gb() { a__git_branch "${@}"; }
a__git_branch() {
git \
branch \
"${@}"
}
# delete a branch
gbd() { a__git_branch_delete "${@}"; }
a__git_branch_delete() {
git \
branch \
--delete \
"${@}"
}
# force a branch deletion
gbdf() { a__git_branch_delete_force "${@}"; }
a__git_branch_delete_force() {
git \
branch \
--delete \
--force \
"${@}"
}
# list branches
gbl() { a__git_branch_list "${@}"; }
a__git_branch_list() {
git \
branch \
--all \
--list \
--verbose \
--verbose \
"${@}"
}
# set the link to a remote branch from a local branch
gbsu() { a__git_branch_set_upstream "${@}"; }
a__git_branch_set_upstream() {
git \
branch \
--set-upstream-to \
"${@}"
}
# switch to a branch or checkout file(s) from a commit
gc() { a__git_checkout "${@}"; }
a__git_checkout() {
git \
checkout \
"${@}"
}
# checkout an orphan branch
gco() { a__git_checkout_orphan "${@}"; }
a__git_checkout_orphan() {
git \
checkout \
--orphan \
"${@}"
}
# pick a commit
gcp() { a__git_cherry_pick "${@}"; }
a__git_cherry_pick() {
git \
cherry-pick \
"${@}"
}
# abort the commit pick
gcpa() { a__git_cherry_pick_abort "${@}"; }
a__git_cherry_pick_abort() {
git \
cherry-pick \
--abort \
"${@}"
}
# continue the commit pick
gcpc() { a__git_cherry_pick_continue "${@}"; }
a__git_cherry_pick_continue() {
git \
cherry-pick \
--continue \
"${@}"
}
# clean untracked files
gcf() { a__git_clean_force "${@}"; }
a__git_clean_force() {
git \
clean \
-d \
--force \
"${@}"
}
# redo the last commit with a different message
gcam() { a__git_commit_amend_message "${@}"; }
a__git_commit_amend_message() {
git \
commit \
--amend \
--message \
"${@}"
}
# make a root commit
gcem() { a__git_commit_empty_message "${@}"; }
a__git_commit_empty_message() {
git \
commit \
--allow-empty \
--allow-empty-message \
--message \
"${@}"
}
# commit the index
gcm() { a__git_commit_message "${@}"; }
a__git_commit_message() {
git \
commit \
--message \
"${@}"
}
# configure the user email
gcue() { a__git_config_user_email "${@}"; }
a__git_config_user_email() {
git \
config \
"user.email" \
"${@}"
}
# configure the user name
gcun() { a__git_config_user_name "${@}"; }
a__git_config_user_name() {
git \
config \
"user.name" \
"${@}"
}
# differences from last or between commits
gd() { a__git_diff "${@}"; }
a__git_diff() {
git \
diff \
"${@}"
}
# display what is indexed in cache
gdc() { a__git_diff_cached "${@}"; }
a__git_diff_cached() {
git \
diff \
--cached \
"${@}"
}
# indexed character-level differences
gdcw() { a__git_diff_cached_word "${@}"; }
a__git_diff_cached_word() {
git \
diff \
--cached \
--word-diff-regex "." \
"${@}"
}
# differences via external tool
gdt() { a__git_diff_tool "${@}"; }
a__git_diff_tool() {
git \
difftool \
--dir-diff \
"${@}"
}
# character-level differences
gdw() { a__git_diff_word "${@}"; }
a__git_diff_word() {
git \
diff \
--word-diff-regex "." \
"${@}"
}
# fetch from the remote repository
gf() { a__git_fetch "${@}"; }
a__git_fetch() {
rwx_gpg_agent_update &&
git \
fetch \
--tags \
--verbose \
"${@}"
}
# fetch from remote repository and prune local orphan branches
gfp() { a__git_fetch_prune "${@}"; }
a__git_fetch_prune() {
a__git_fetch \
--prune \
"${@}"
}
# garbage collect all orphan commits
ggc() { a__git_garbage_collect "${@}"; }
a__git_garbage_collect() {
git \
reflog \
expire \
--all \
--expire "all" &&
git \
gc \
--aggressive \
--prune="now"
}
# initialize a new repository
gi() { a__git_init "${@}"; }
a__git_init() {
git \
init \
"${@}"
}
# initialize a new bare repository
gib() { a__git_init_bare "${@}"; }
a__git_init_bare() {
git \
init \
--bare \
"${@}"
}
# log history
gl() { a__git_log "${@}"; }
a__git_log() {
git \
log \
--abbrev=8 \
--abbrev-commit \
--format="${RWX_GIT_LOG_FORMAT}" \
--graph \
"${@}"
}
# log all history
gla() { a__git_log_all "${@}"; }
a__git_log_all() {
a__git_log \
--all \
"${@}"
}
# log all history with patches
glap() { a__git_log_all_patch "${@}"; }
a__git_log_all_patch() {
a__git_log \
--all \
--patch \
"${@}"
}
# log history with patches
glp() { a__git_log_patch "${@}"; }
a__git_log_patch() {
a__git_log \
--patch \
"${@}"
}
# fast-forward merge to remote branch
gm() { a__git_merge "${@}"; }
a__git_merge() {
git \
merge \
--ff-only \
"${@}"
}
# abort the current merge commit
gma() { a__git_merge_abort "${@}"; }
a__git_merge_abort() {
git \
merge \
--abort \
"${@}"
}
# do a merge commit
gmc() { a__git_merge_commit "${@}"; }
a__git_merge_commit() {
git \
merge \
--no-ff \
--message \
"${@}"
}
# squash a branch and index its modifications
gms() { a__git_merge_squash "${@}"; }
a__git_merge_squash() {
git \
merge \
--squash \
"${@}"
}
# merge via external tool
gmt() { a__git_merge_tool "${@}"; }
a__git_merge_tool() {
git \
mergetool \
"${@}"
}
# push to the remote repository
gp() { a__git_push "${@}"; }
a__git_push() {
rwx_gpg_agent_update &&
git \
push \
--tags \
--verbose \
"${@}"
}
# delete from the remote repository
gpd() { a__git_push_delete "${@}"; }
a__git_push_delete() {
git \
push \
--delete \
"${@}"
}
# force the push to the remote repository
gpf() { a__git_push_force "${@}"; }
a__git_push_force() {
a__git_push \
--force \
"${@}"
}
# rebase current branch onto another
grb() { a__git_re_base "${@}"; }
a__git_re_base() {
git \
rebase \
"${@}"
}
# abort current rebase
grba() { a__git_re_base_abort "${@}"; }
a__git_re_base_abort() {
git \
rebase \
--abort \
"${@}"
}
# continue current rebase
grbc() { a__git_re_base_continue "${@}"; }
a__git_re_base_continue() {
git \
rebase \
--continue \
"${@}"
}
# force rebase without fast-forward
grbf() { a__git_re_base_force "${@}"; }
a__git_re_base_force() {
git \
rebase \
--force-rebase \
"${@}"
}
# rebase interactively
grbi() { a__git_re_base_interactive "${@}"; }
a__git_re_base_interactive() {
git \
rebase \
--interactive \
"${@}"
}
# add a new remote repository
grma() { a__git_re_mote_add "${@}"; }
a__git_re_mote_add() {
git \
remote \
add \
"${@}"
}
# list remote repositories
grml() { a__git_re_mote_list "${@}"; }
a__git_re_mote_list() {
git \
remote \
--verbose \
"${@}"
}
# set the location of a remote repository
grmsu() { a__git_re_mote_set_upstream "${@}"; }
a__git_re_mote_set_upstream() {
git \
remote \
set-url \
"${@}"
}
# show connection to a remote repository
grms() { a__git_re_mote_show "${@}"; }
a__git_re_mote_show() {
git \
remote \
show \
"${@}"
}
# remove and add removal to index
grm() { a__git_re_move "${@}"; }
a__git_re_move() {
git \
rm \
"${@}"
}
# remove file(s) from index or move current branch pointer
grs() { a__git_re_set "${@}"; }
a__git_re_set() {
git \
reset \
"${@}"
}
# wipe modifications or reset current branch to another commit
grsh() { a__git_re_set_hard "${@}"; }
a__git_re_set_hard() {
git \
reset \
--hard \
"${@}"
}
# show a commit
gsc() { a__git_show_commit "${@}"; }
a__git_show_commit() {
git \
show \
"${@}"
}
# current state of repository
gs() { a__git_status "${@}"; }
a__git_status() {
git \
status \
--untracked-files="all" \
"${@}"
}
# tag a commit
gt() { a__git_tag "${@}"; }
a__git_tag() {
git \
tag \
"${@}"
}
# delete a tag
gtd() { a__git_tag_delete "${@}"; }
a__git_tag_delete() {
git \
tag \
--delete \
"${@}"
}
# update head ref
gurh() { a__git_update_ref_head "${@}"; }
a__git_update_ref_head() {
if [ -n "${2}" ]; then
git \
update-ref \
"refs/heads/${1}" \
"${2}"
fi
}

12
sh/alias/gpg.sh Normal file
View file

@ -0,0 +1,12 @@
# turn gpg agent off
gak() { a__gpg_agent_kill "${@}"; }
a__gpg_agent_kill() {
gpgconf \
--kill "gpg-agent"
}
# bind gpg agent to current tty
gau() { a__gpg_agent_update "${@}"; }
a__gpg_agent_update() {
rwx_gpg_agent_update
}

9
sh/alias/grep.sh Normal file
View file

@ -0,0 +1,9 @@
# grep from current directory with regex
g() { a__grep "${@}"; }
a__grep() {
grep \
--directories "recurse" \
--line-number \
--regexp \
"${@}"
}

14
sh/alias/kill.sh Normal file
View file

@ -0,0 +1,14 @@
# kill a process by id
k() { a__kill "${@}"; }
a__kill() {
kill \
"${@}"
}
# force kill a process by id
kf() { a__kill_force "${@}"; }
a__kill_force() {
kill \
-9 \
"${@}"
}

14
sh/alias/killall.sh Normal file
View file

@ -0,0 +1,14 @@
# kill all instances of a process by name
ka() { a__kill_all "${@}"; }
a__kill_all() {
killall \
"${@}"
}
# force kill all instances of a process by name
kaf() { a__kill_all_force "${@}"; }
a__kill_all_force() {
killall \
-9 \
"${@}"
}

32
sh/alias/ls.sh Normal file
View file

@ -0,0 +1,32 @@
export LS_COLORS="\
di=0;94\
"
# list current directory’s entries
l() { a__ls "${@}"; }
a__ls() {
ls \
--all \
--color \
-l \
-p \
--time-style "+" \
"${@}"
}
# list timestamps
lt() { a__ls_time "${@}"; }
a__ls_time() {
a__ls \
--time-style "+%Y%m%d-%H%M%S%-:::z" \
"${@}"
}
# list timestamps recent last
ltr() { a__ls_time_reverse "${@}"; }
a__ls_time_reverse() {
a__ls_time \
--reverse \
-t \
"${@}"
}

31
sh/alias/lsblk.sh Normal file
View file

@ -0,0 +1,31 @@
# list block devices
lb() { a__list_block "${@}"; }
a__list_block() {
a__list_block_output \
"SIZE" \
"TYPE" \
"FSTYPE" \
"LABEL" \
"MOUNTPOINTS" \
"${@}"
}
# base arguments
lbne() { a__list_block_no_empty "${@}"; }
a__list_block_no_empty() {
lsblk \
--noempty \
"${@}"
}
# output arguments
lbo() { a__list_block_output "${@}"; }
a__list_block_output() {
local argument
local arguments="NAME"
for argument in "${@}"; do
arguments="${arguments},${argument}"
done
a__list_block_no_empty \
--output "${arguments}"
}

14
sh/alias/mkdir.sh Normal file
View file

@ -0,0 +1,14 @@
# make a directory
md() { a__make_directory "${@}"; }
a__make_directory() {
mkdir \
"${@}"
}
# make a directory after making its parents
mdp() { a__make_directory_parents "${@}"; }
a__make_directory_parents() {
mkdir \
--parents \
"${@}"
}

5
sh/alias/mount.sh Normal file
View file

@ -0,0 +1,5 @@
m() { a__mount "${@}"; }
a__mount() {
mount \
"${@}"
}

7
sh/alias/mv.sh Normal file
View file

@ -0,0 +1,7 @@
# move interactively
mvi() { a__mo_ve_interactive "${@}"; }
a__mo_ve_interactive() {
mv \
--interactive \
"${@}"
}

5
sh/alias/nano.sh Normal file
View file

@ -0,0 +1,5 @@
nn() { a__na_no "${@}"; }
a__na_no() {
nano \
"${@}"
}

5
sh/alias/newsboat.sh Normal file
View file

@ -0,0 +1,5 @@
nb() { a__news_boat "${@}"; }
a__news_boat() {
newsboat \
"${@}"
}

140
sh/alias/overlay.sh Normal file
View file

@ -0,0 +1,140 @@
obm() { a__overlay_bind_mount "${@}"; }
a__overlay_bind_mount() {
local directory
for directory in "dev" "dev/pts" "proc" "sys"; do
if ! mount --bind "/${directory}" "overlay/mount/${directory}"; then
rwx_log_error "Unable to bind mount directory: ${directory}"
return 1
fi
done
}
obu() { a__overlay_bind_unmount "${@}"; }
a__overlay_bind_unmount() {
local directory
for directory in "sys" "proc" "dev/pts" "dev"; do
if ! umount --lazy "overlay/mount/${directory}"; then
rwx_log_error "Unable to bind unmount directory: ${directory}"
return 1
fi
done
}
ocr() { a__overlay_command_root "${@}"; }
a__overlay_command_root() {
chroot \
"overlay/mount" "${@}"
}
ocu() { a__overlay_command_user "${@}"; }
a__overlay_command_user() {
chroot \
--userspec "1000:1000" \
"overlay/mount" "${@}"
}
omm() { a__overlay_mirror_mount "${@}"; }
a__overlay_mirror_mount() {
mount --make-rslave --rbind "/deb" "overlay/mount/deb"
}
omu() { a__overlay_mirror_unmount "${@}"; }
a__overlay_mirror_unmount() {
umount --recursive "overlay/mount/deb"
}
orm() { a__overlay_root_mount "${@}"; }
a__overlay_root_mount() {
local root="${1}"
if [ -z "${root}" ]; then
rwx_log_error "No root target directory"
return 1
fi
root="$(realpath "${root}")"
if ! mkdir "overlay"; then
rwx_log_error "Unable to make overlay directory"
return 2
fi
(
if ! cd "overlay"; then
rwx_log_error "Unable to move into overlay directory"
return 3
fi
local directory
for directory in "lower" "upper" "work" "mount"; do
if ! mkdir --parents "${directory}"; then
rwx_log_error "Unable to make directory: ${directory}"
return 4
fi
done
local file="${root}/filesystem.squashfs"
if ! mount "${file}" "lower"; then
rwx_log_error "Unable to lower mount: ${file}"
return 5
fi
if ! mount \
-o "lowerdir=lower,upperdir=upper,workdir=work" \
-t "overlay" \
"overlay" "mount"; then
rwx_log_error "Unable to overlay mount"
return 6
fi
)
}
ors() { a__overlay_root_squash "${@}"; }
a__overlay_root_squash() {
local directory="${1}"
local file
local level="${2}"
if [ -n "${directory}" ]; then
if mkdir "${directory}"; then
[ -n "${level}" ] || level="18"
for file in "vmlinuz" "initrd.img"; do
cp "overlay/mount/${file}" "${directory}"
done
mksquashfs \
"overlay/mount" "${directory}/filesystem.squashfs" \
-noappend \
-comp "zstd" -Xcompression-level "${level}"
chown --recursive 1000:1000 "${directory}"
fi
fi
}
oru() { a__overlay_root_unmount "${@}"; }
a__overlay_root_unmount() {
(
if ! cd "overlay"; then
rwx_log_error "Unable to move into overlay directory"
return 1
fi
if ! umount "mount"; then
rwx_log_error "Unable to unmount mount directory"
return 2
fi
if ! rmdir "mount"; then
rwx_log_error "Unable to remove mount directory"
return 3
fi
local directory
for directory in "upper" "work"; do
if ! rm --force --recursive "${directory}"; then
rwx_log_error "Unable to remove directory: ${directory}"
return 4
fi
done
if ! umount "lower"; then
rwx_log_error "Unable to unmount lower directory"
return 5
fi
if ! rmdir "lower"; then
rwx_log_error "Unable to remove lower directory"
return 6
fi
)
if ! rmdir "overlay"; then
rwx_log_error "Unable to remove overlay directory"
return 7
fi
}

14
sh/alias/pass.sh Normal file
View file

@ -0,0 +1,14 @@
# display pass entry’s content
p() { a__pass "${@}"; }
a__pass() {
pass \
"${@}"
}
# copy passphrase into clipboard
pc() { a__pass_clip "${@}"; }
a__pass_clip() {
pass \
--clip \
"${@}"
}

7
sh/alias/pgrep.sh Normal file
View file

@ -0,0 +1,7 @@
# look for a string in processes names
pg() { a__proc_grep "${@}"; }
a__proc_grep() {
pgrep \
--list-full \
"${@}"
}

17
sh/alias/pwgen.sh Normal file
View file

@ -0,0 +1,17 @@
# generate passwords
pwg() { a__pass_word_gen "${@}"; }
a__pass_word_gen() {
pwgen \
-1 \
--num-passwords 1048576 \
--secure \
"${@}"
}
# generate passwords with symbols
pwgs() { a__pass_word_gen_symbols "${@}"; }
a__pass_word_gen_symbols() {
a__pass_word_gen \
--symbols \
"${@}"
}

7
sh/alias/rm.sh Normal file
View file

@ -0,0 +1,7 @@
# remove interactively
rmi() { a__re_move_interactive "${@}"; }
a__re_move_interactive() {
rm \
--interactive \
"${@}"
}

27
sh/alias/rsync.sh Normal file
View file

@ -0,0 +1,27 @@
# synchronize
rs() { a__r_sync "${@}"; }
a__r_sync() {
rsync \
--archive \
--no-inc-recursive \
--partial \
--progress \
--verbose \
"${@}"
}
# synchronize and delete after
rsda() { a__r_sync_delete_after "${@}"; }
a__r_sync_delete_after() {
a__r_sync \
--delete-after \
"${@}"
}
# synchronize and delete before
rsdb() { a__r_sync_delete_before "${@}"; }
a__r_sync_delete_before() {
a__r_sync \
--delete-before \
"${@}"
}

29
sh/alias/shell.sh Normal file
View file

@ -0,0 +1,29 @@
# shorten alias
a() {
alias \
"${@}"
}
# swap directory (current ↔ previous)
sd() {
cd \
- ||
return
}
# exit terminal
x() {
exit \
"${@}"
}
[ "${RWX_SHELL}" = "bash" ] || return
# shellcheck disable=SC3033
..() {
cd ..
}
# shellcheck disable=SC3033
...() {
cd ../..
}

31
sh/alias/tar.sh Normal file
View file

@ -0,0 +1,31 @@
tc() { a__tar_create "${@}"; }
a__tar_create() {
a__tar_verbose \
--create \
--auto-compress \
--file \
"${@}"
}
tl() { a__tar_list "${@}"; }
a__tar_list() {
a__tar_verbose \
--list \
--file \
"${@}"
}
tv() { a__tar_verbose "${@}"; }
a__tar_verbose() {
tar \
--verbose \
"${@}"
}
tx() { a__tar_xtract "${@}"; }
a__tar_xtract() {
a__tar_verbose \
--extract \
--file \
"${@}"
}

5
sh/alias/tmux.sh Normal file
View file

@ -0,0 +1,5 @@
tm() { a__t_mux "${@}"; }
a__t_mux() {
tmux \
"${@}"
}

12
sh/alias/tree.sh Normal file
View file

@ -0,0 +1,12 @@
t() { a__tree "${@}"; }
a__tree() {
tree \
"${@}"
}
ta() { a__tree_all "${@}"; }
a__tree_all() {
tree \
-a \
"${@}"
}

6
sh/cryptsetup.sh Normal file
View file

@ -0,0 +1,6 @@
_rwx_cmd_cs() { rwx_crypt_setup "${@}"; }
rwx_crypt_setup() {
local action="${1}"
echo "cs: ${action}"
}

76
sh/debian.sh Normal file
View file

@ -0,0 +1,76 @@
RWX_DEBIAN_CODENAME="$(
grep "VERSION_CODENAME" "/etc/os-release" |
cut --delimiter "=" --fields "2"
)"
rwx_apt_clean() {
apt-get \
clean
}
rwx_apt_conf_write() {
printf "\
Acquire::AllowInsecureRepositories False;
Acquire::AllowWeakRepositories False;
Acquire::AllowDowngradeToInsecureRepositories False;
Acquire::Check-Valid-Until True;
APT::Install-Recommends False;
APT::Install-Suggests False;
APT::Get::Show-Versions True;
Dir::Etc::SourceParts \"\";
Dpkg::Progress True;
" >"/etc/apt/apt.conf.d/apt.conf"
}
rwx_apt_install_backports() {
rwx_apt_install_target "${RWX_DEBIAN_CODENAME}-backports" "${@}"
}
rwx_apt_install_release() {
rwx_apt_install_target "${RWX_DEBIAN_CODENAME}" "${@}"
}
rwx_apt_install_target() {
local target="${1}"
shift
local package
for package in "${@}"; do
rwx_log "" \
"${package}${target}"
apt-get \
install \
--assume-yes \
--target-release "${target}" \
"${package}"
rwx_apt_clean
done
}
rwx_apt_sources_write() {
printf "%s" "\
deb https://deb.debian.org/debian \
${RWX_DEBIAN_CODENAME} main non-free-firmware contrib non-free
deb https://deb.debian.org/debian \
${RWX_DEBIAN_CODENAME}-backports main non-free-firmware contrib non-free
deb https://deb.debian.org/debian \
${RWX_DEBIAN_CODENAME}-updates main non-free-firmware contrib non-free
deb https://deb.debian.org/debian-security \
${RWX_DEBIAN_CODENAME}-security main non-free-firmware contrib non-free
" >"/etc/apt/sources.list"
}
rwx_apt_update() {
apt-get \
update
}
rwx_apt_upgrade() {
apt-get \
upgrade \
--assume-yes
rwx_apt_clean
}
rwx_debian_frontend_disable() {
export DEBIAN_FRONTEND="noninteractive"
}

121
sh/fs.sh Normal file
View file

@ -0,0 +1,121 @@
rwx_fs_make_btrfs() {
local device="${1}"
local label="${2}"
local uuid="${3}"
if [ -b "${device}" ]; then
set -- \
--force \
--checksum "sha256"
if [ -n "${label}" ]; then
set -- "${@}" \
--label "${label}"
fi
if [ -n "${uuid}" ]; then
set -- "${@}" \
--uuid "${uuid}"
fi
mkfs.btrfs "${@}" "${device}"
fi
}
rwx_fs_make_btrfs_swap() {
local path="${1}"
local size="${2}"
local uuid="${3}"
if [ -n "${path}" ]; then
set -- filesystem mkswapfile
if [ -n "${size}" ]; then
set -- "${@}" \
--size "${size}"
fi
if [ -n "${uuid}" ]; then
set -- "${@}" \
--uuid "${uuid}"
fi
btrfs "${@}" "${path}"
fi
}
rwx_fs_make_fat() {
local device="${1}"
local name="${2}"
local volid="${3}"
if [ -b "${device}" ]; then
set -- \
-F 32 \
-S 4096
if [ -n "${name}" ]; then
set -- "${@}" \
-n "${name}"
fi
if [ -n "${volid}" ]; then
set -- "${@}" \
-i "${volid}"
fi
mkfs.fat "${@}" "${device}"
fi
}
rwx_fs_raid_create() {
if [ -n "${4}" ]; then
local name="${1}"
local uuid="${2}"
shift 2
mdadm \
--create "/dev/md/${name}" \
--level 0 \
--metadata 1 \
--name "md:${name}" \
--raid-devices ${#} \
--uuid "${uuid}" \
"${@}"
fi
}
rwx_fs_wipe() {
local device="${1}"
local buffer="${2}"
local count="${3}"
if [ -b "${device}" ]; then
set -- \
status="progress" \
if="/dev/zero" \
of="${device}"
if [ -n "${buffer}" ]; then
set -- "${@}" \
bs="${buffer}"
fi
if [ -n "${count}" ]; then
set -- "${@}" \
count="${count}"
fi
dd "${@}"
fi
}
rwx_fs_luks_format() {
local passphrase="${1}"
local device="${2}"
local label="${3}"
local uuid="${4}"
if [ -b "${device}" ]; then
set -- \
--batch-mode \
--cipher "aes-xts-plain64" \
--hash "sha512" \
--iter-time 4096 \
--key-size 512 \
--pbkdf "argon2id" \
--type "luks2" \
--use-random \
--verbose
if [ -n "${label}" ]; then
set -- "${@}" --label "${label}"
fi
if [ -n "${uuid}" ]; then
set -- "${@}" --uuid "${uuid}"
fi
echo "${passphrase}" |
cryptsetup "${@}" luksFormat "${device}"
fi
}

24
sh/gnome.sh Normal file
View file

@ -0,0 +1,24 @@
rwx_gnome_proxy() {
local value
case "${1}" in
"on") value="manual" ;;
*) value="none" ;;
esac
gsettings set "org.gnome.system.proxy" "mode" "${value}"
}
rwx_gnome_workspaces_primary() {
local bool
local group="org.gnome.mutter"
local name="workspaces-only-on-primary"
local var="${group}/${name}"
# get
bool="$(gsettings get "${group}" "${name}")"
rwx_log_debug "${var}: ${bool}"
# not
bool="$(rwx_not "${bool}")"
rwx_log_debug "bool: ${bool}"
# set
gsettings set "${group}" "${name}" "${bool}"
rwx_log_info "${var}: ${bool}"
}

19
sh/gpg.sh Normal file
View file

@ -0,0 +1,19 @@
# bind gpg agent to current tty
rwx_gpg_agent_update() {
gpg-connect-agent \
updatestartuptty \
/bye
}
rwx_gpg_ssh_auth_sock() {
local user_id
user_id=$(id --user)
if [ "${user_id}" -ne 0 ]; then
if [ -f "${HOME}/.gnupg/gpg-agent.conf" ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
fi
fi
}
rwx_gpg_ssh_auth_sock

34
sh/lint/shellcheck.sh Normal file
View file

@ -0,0 +1,34 @@
rwx_shellcheck() {
local root="${1}"
local file module modules path
file="$(mktemp)"
modules="$(rwx_find_shell "${root}")"
rwx_ifs_set
for module in ${modules}; do
path="${root}/${module}"
echo ". \"${path}\"" >>"${file}"
done
rwx_ifs_unset
rwx_shellcheck_file "${file}"
rwx_remove "${file}"
}
rwx_shellcheck_file() {
local file="${1}"
shellcheck \
--check-sourced \
--enable "all" \
--exclude "3043" \
--external-sources \
--shell "dash" \
"${file}"
}
rwx_shellcheck_write() {
rwx_file_write ".shellcheckrc" "\
disable=3043
enable=all
external-sources=true
shell=sh
"
}

4
sh/lint/shfmt.sh Normal file
View file

@ -0,0 +1,4 @@
rwx_shfmt() {
local path="${1}"
shfmt --diff "${path}"
}

6
sh/live.sh Normal file
View file

@ -0,0 +1,6 @@
# remount read-only medium in read-write
rwx_live_medium_remount() {
mount \
-o "remount,rw" \
"/usr/lib/live/mount/medium"
}

68
sh/log.sh Normal file
View file

@ -0,0 +1,68 @@
RWX_LOG_LEVEL_FATAL=0
RWX_LOG_LEVEL_ERROR=1
RWX_LOG_LEVEL_WARN=2
RWX_LOG_LEVEL_INFO=3
RWX_LOG_LEVEL_DEBUG=4
RWX_LOG_LEVEL_TRACE=5
RWX_LOG_LEVEL=${RWX_LOG_LEVEL_INFO}
rwx_log() { rwx_log_info "${@}"; }
rwx_log_debug() {
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_DEBUG}" ]; then
_rwx_log "[DEBUG]" "${@}"
fi
}
rwx_log_error() {
local code="${1}"
shift
[ -n "${code}" ] || rwx_log_fatal 1 "No error code"
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_ERROR}" ]; then
_rwx_log "[ERROR]" "${@}" >&2
return "${code}"
fi
}
rwx_log_fatal() {
local code="${1}"
shift
[ -n "${code}" ] || rwx_log_fatal 1 "No error code"
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_FATAL}" ]; then
_rwx_log "[FATAL]" "${@}" >&2
exit "${code}"
fi
}
rwx_log_info() {
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_INFO}" ]; then
_rwx_log "" "${@}"
fi
}
rwx_log_trace() {
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_TRACE}" ]; then
_rwx_log "[TRACE]" "${@}"
fi
}
rwx_log_warn() {
if [ "${RWX_LOG_LEVEL}" -ge "${RWX_LOG_LEVEL_WARN}" ]; then
_rwx_log "[ WARN]" "${@}"
fi
}
_rwx_log() {
local prefix="${1}"
shift
[ ${#} -gt 0 ] || set -- ""
local line
for line in "${@}"; do
if [ -n "${prefix}" ]; then
__rwx_log "${prefix} ${line}"
else
__rwx_log "${line}"
fi
done
}

157
sh/main.sh Executable file
View file

@ -0,0 +1,157 @@
#! /usr/bin/env sh
# ╭───────────╮
# │ constants │
# ╰───────────╯
RWX_MAIN_NAME="main.sh"
RWX_SELF_NAME="rwx"
RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_"
# ╭───────────╮
# │ variables │
# ╰───────────╯
RWX_ROOT_SYSTEM="/usr/local/lib/${RWX_SELF_NAME}"
RWX_SELF_USER="${HOME}/${RWX_SELF_NAME}"
RWX_SHELL="$(cat "/proc/${$}/comm")"
RWX_MAIN_PATH="${RWX_ROOT_SYSTEM}/${RWX_MAIN_NAME}"
# ╭──────╮
# │ core │
# ╰──────╯
# test if active shell is in interactive mode
rwx_shell_interactive() {
case "${-}" in
*i*) ;;
*) return 1 ;;
esac
}
# ╭──────┬─────╮
# │ core │ log │
# ╰──────┴─────╯
__rwx_log() {
if rwx_shell_interactive; then
[ ${#} -gt 0 ] || set -- ""
local line
for line in "${@}"; do
echo "${line}"
done
fi
}
# ╭──────┬──────╮
# │ core │ find │
# ╰──────┴──────╯
# find directory’s files by extension
rwx_find_extension() {
local extension="${1}"
local root="${2}"
local file="${3}"
set -- \
"${root}" \
-name "*.${extension}" \
-type "f"
[ -n "${file}" ] &&
set -- "${@}" \
-not \
-name "${file}"
find "${@}" \
-printf "%P\n" |
sort
}
# find directory’s sh files
rwx_find_shell() {
rwx_find_extension "sh" "${@}"
}
# ╭──────┬─────╮
# │ core │ ifs │
# ╰──────┴─────╯
rwx_ifs_set() {
_RWX_IFS="${IFS}"
IFS="
"
}
rwx_ifs_unset() {
IFS="${_RWX_IFS}"
unset RWX_IFS
}
# ╭──────┬────────╮
# │ core │ source │
# ╰──────┴────────╯
rwx_source() {
local path="${1}"
[ -d "${path}" ] ||
return 1
local count module modules
modules="$(rwx_find_shell "${path}" "${RWX_MAIN_NAME}")"
rwx_ifs_set
count=0
__rwx_log "" \
". ${path}"
for module in ${modules}; do
count=$((count + 1))
__rwx_log "$(printf "%02d" "${count}") ${module%.sh}"
module="${path}/${module}"
# shellcheck disable=SC1090
. "${module}"
done
rwx_ifs_unset
}
# ╭──────┬──────╮
# │ core │ main │
# ╰──────┴──────╯
# run initial steps
rwx_main() {
# system root
if ! rwx_source "${RWX_ROOT_SYSTEM}"; then
__rwx_log "Not a directory: ${RWX_ROOT_SYSTEM}"
return 1
fi
# user root
rwx_source "${RWX_SELF_USER}"
#
local argument
argument="$(echo "${0}" | sed "s|^-||")"
case "${argument}" in
"bash" | \
"dash" | \
"sh")
# run interactive extras
if rwx_shell_interactive; then
# check format
rwx_log
rwx_shfmt "${RWX_ROOT_SYSTEM}"
# check syntax
rwx_log
rwx_shellcheck "${RWX_ROOT_SYSTEM}"
# help
rwx_log
rwx_self_help
fi
;;
*)
local function name
name="$(basename "${argument}")"
function="${RWX_SELF_COMMAND}${name}"
"${function}" "${@}"
;;
esac
}
# run main function
rwx_main "${@}"

94
sh/rescue/common.sh Normal file
View file

@ -0,0 +1,94 @@
rwx_rescue_configure() {
local hostname="${1}"
# apt / conf
rwx_apt_conf_write
# apt / sources
rwx_apt_sources_write
# bash / rc
main_link_bashrc
mv "${HOME}/.bashrc" "${HOME}/.bashrc.old"
# host name
hostname "${hostname}"
# locales
printf "\
en_US.UTF-8 UTF-8
fr_FR.UTF-8 UTF-8
" >"/etc/locale.gen"
# generate locales
locale-gen
# update catalog
rwx_apt_update
# disable frontend
rwx_debian_frontend_disable
# install backports
rwx_apt_install_backports "tmux"
# install packages
rwx_apt_install_release "apt-file" "mosh" "screen" "byobu"
# update catalog
rwx_apt_update
}
rwx_rescue_install() {
# update catalog
rwx_apt_update
# disable frontend
rwx_debian_frontend_disable
# upgrade packages
rwx_apt_upgrade
# install packages
rwx_apt_install_release \
"man-db" \
"dmidecode" "efibootmgr" "lshw" "pciutils" "usbutils" \
"parted" "mdadm" "cryptsetup-bin" "lvm2" \
"btrfs-progs" "dosfstools" "duperemove" "squashfs-tools" \
"git" "micro" "nano" "python3" "rsync" "vim" \
"exa" "lf" "ncdu" "nnn" "ranger" "tree" \
"file" "htop" "iotop" "ipcalc" "libdigest-sha3-perl" "lsof"
# install backports
rwx_apt_install_backports \
"grub-pc-bin" \
\
"grub-efi-amd64-bin"
}
rwx_rescue_upload() {
local host="${1}"
local hostname="${2}"
if [ -n "${hostname}" ]; then
local user="root"
#
local user_host="${user}@${host}"
# remove fingerprints
ssh-keygen -R "${host}"
# copy ssh id
ssh-copy-id \
-o "StrictHostKeyChecking=accept-new" \
"${user_host}"
# upload root
rsync --delete --recursive \
"$(dirname "${ENV}")" "${user_host}:/etc"
# call setup
# TODO variable
ssh "${user_host}" -- \
". \"${ENV}\" ; rwx_rescue_configure \"${hostname}\""
# create session
ssh "${user_host}" -- byobu new-session -d
# send keys
ssh "${user_host}" -- byobu send-keys "rwx_rescue_install" "C-m"
# attach session
mosh "${user_host}" -- byobu attach-session
else
echo "host & hostname"
return 1
fi
}
rwx_rescue_wipe_1_zero() {
rwx_fs_wipe "/dev/mapper/crypt" "512M"
}
rwx_rescue_wipe_3_close() {
umount "/media/boot"
umount "/media/crypt" &&
cryptsetup luksClose "crypt"
}

125
sh/rescue/hetzner.sh Normal file
View file

@ -0,0 +1,125 @@
rwx_rescue_wipe_0_init_hetzner_8_8() {
local device
set \
"/dev/sda" \
"/dev/sdb"
local members
local number
local passphrase
# read passphrase
passphrase="$(rwx_read_passphrase)"
# warn
rwx_warn_wipe "${@}"
#
number=0
for device in "${@}"; do
number=$((number + 1))
echo
echo "#${number}: ${device}"
#
parted --script "${device}" \
mktable gpt \
unit "mib" \
mkpart "crypt-${number}" 33282 7630885 \
mkpart "boot-${number}" 514 33282 \
mkpart "esp-${number}" 2 514 \
set 3 esp on \
mkpart "bios-${number}" 1 2 \
set 4 bios_grub on
done
#
number=0
for device in "${@}"; do
number=$((number + 1))
echo
echo "#${number}: ${device}4"
# wipe bios
rwx_fs_wipe "${device}4"
done
#
number=0
for device in "${@}"; do
number=$((number + 1))
echo
echo "#${number}: ${device}3"
# format esp
rwx_fs_wipe "${device}3" "1M"
rwx_fs_make_fat "${device}3" "esp-${number}" "0000000${number}"
# mount esp
mkdir --parents "/media/esp/${number}"
mount "${device}3" "/media/esp/${number}"
done
#
number=0
for device in "${@}"; do
number=$((number + 1))
echo
echo "#${number}: ${device}2"
# wipe boot
rwx_fs_wipe "${device}2" "1G" 1
done
#
members=""
for device in "${@}"; do
members="${members} ${device}2"
done
rwx_fs_raid_create \
"boot" "00000000:00000000:00000000:00000002" ${members}
#
rwx_fs_make_btrfs "/dev/md/boot" "boot" \
"00000000-0000-0000-0000-00000000000b"
# mount boot
mkdir --parents "/media/boot"
mount \
--options "autodefrag,compress-force=zstd" \
"/dev/md/boot" "/media/boot"
#
number=0
for device in "${@}"; do
number=$((number + 1))
echo
echo "#${number}: ${device}1"
# wipe crypt head
rwx_fs_wipe "${device}1" "1G" 1
done
#
members=""
for device in "${@}"; do
members="${members} ${device}1"
done
rwx_fs_raid_create \
"crypt" "00000000:00000000:00000000:00000001" ${members}
# encrypt
rwx_fs_luks_format "${passphrase}" "/dev/md/crypt"
# open
echo "${passphrase}" |
cryptsetup luksOpen "/dev/md/crypt" "crypt"
# passphrase
unset passphrase
}
rwx_rescue_wipe_2_make_hetzner_8_8() {
local passphrase
# close
cryptsetup luksClose "crypt"
# read passphrase
passphrase="$(rwx_read_passphrase)"
# encrypt
rwx_fs_luks_format "${passphrase}" "/dev/md/crypt"
# open
echo "${passphrase}" |
cryptsetup luksOpen "/dev/md/crypt" "crypt"
# passphrase
unset passphrase
# format crypt
rwx_fs_make_btrfs "/dev/mapper/crypt" "crypt" \
"00000000-0000-0000-0000-00000000000c"
# mount crypt
mkdir --parents "/media/crypt"
mount \
--options "autodefrag,compress-force=zstd" \
"/dev/mapper/crypt" "/media/crypt"
# make swap file
rwx_fs_make_btrfs_swap "/media/crypt/swap" "64g" \
"00000000-0000-0000-0000-000000000005"
}

71
sh/rescue/ovh.sh Normal file
View file

@ -0,0 +1,71 @@
rwx_rescue_wipe_0_init_ovh_vle2() {
local device="/dev/sdb"
local passphrase
# read passphrase
passphrase="$(rwx_read_passphrase)"
# warn
rwx_warn_wipe "${device}"
#
parted --script "${device}" \
mktable gpt \
unit "mib" \
mkpart "crypt" 4610 40959 \
mkpart "boot" 514 4610 \
mkpart "esp" 2 514 \
set 3 esp on \
mkpart bios 1 2 \
set 4 bios_grub on
# bios / wipe
rwx_fs_wipe "${device}4"
# esp / wipe
rwx_fs_wipe "${device}3" "1M"
# esp / format
rwx_fs_make_fat "${device}3" "esp" "00000001"
# esp / mount
mkdir --parents "/media/esp"
mount "${device}3" "/media/esp"
# boot / wipe
rwx_fs_wipe "${device}2" "1G" 1
# boot / format
rwx_fs_make_btrfs "${device}2" "boot" \
"00000000-0000-0000-0000-00000000000b"
# boot / mount
mkdir --parents "/media/boot"
mount --options "autodefrag,compress-force=zstd" \
"${device}2" "/media/boot"
# crypt / wipe
rwx_fs_wipe "${device}1" "1G" 1
# crypt / encrypt
rwx_fs_luks_format "${passphrase}" "${device}1"
# crypt / open
echo "${passphrase}" |
cryptsetup luksOpen "${device}1" "crypt"
# passphrase
unset passphrase
}
rwx_rescue_wipe_2_make_ovh_vle2() {
local device="/dev/sdb"
local passphrase
# crypt / close
cryptsetup luksClose "crypt"
# read passphrase
passphrase="$(rwx_read_passphrase)"
# crypt / encrypt
rwx_fs_luks_format "${passphrase}" "${device}1"
# crypt / open
echo "${passphrase}" |
cryptsetup luksOpen "${device}1" "crypt"
# passphrase
unset passphrase
# crypt / format
rwx_fs_make_btrfs "/dev/mapper/crypt" "crypt" \
"00000000-0000-0000-0000-00000000000c"
# crypt / mount
mkdir --parents "/media/crypt"
mount --options "autodefrag,compress-force=zstd" \
"/dev/mapper/crypt" "/media/crypt"
# crypt / swap
rwx_fs_make_btrfs_swap "/media/crypt/swap" "4g" \
"00000000-0000-0000-0000-000000000005"
}

82
sh/self.sh Normal file
View file

@ -0,0 +1,82 @@
# get commands from root
rwx_self_commands() {
grep \
--directories "recurse" \
--no-filename \
"^${RWX_SELF_COMMAND}" "${RWX_ROOT_SYSTEM}" |
cut --delimiter "(" --fields 1 |
sed "s|^${RWX_SELF_COMMAND}||"
}
# get functions from root
rwx_self_functions() {
grep \
--directories "recurse" \
--no-filename \
"()" "${RWX_ROOT_SYSTEM}" |
cut --delimiter "(" --fields 1
}
# output help message
rwx_self_help() {
rwx_log \
"rwx_… = functions" \
" a__… = aliases" \
" u__… = user"
}
_rwx_cmd_rwx_install() { rwx_self_install "${@}"; }
rwx_self_install() {
local target="${1}"
local command file
# commands
local root="${target}/usr/local/bin"
for command in $(rwx_self_commands); do
file="${root}/${command}"
rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}"
done
# sh
file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh"
rwx_remove "${file}"
rwx_file_write "${file}" "export ENV=\"${RWX_MAIN_PATH}\""
# bash
file="/etc/bash.bashrc"
rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}"
}
rwx_self_subset() {
local argument path
for argument in "${@}"; do
path="${RWX_ROOT_SYSTEM}/${argument}"
if [ -d "${path}" ]; then
local file
for file in $(rwx_find_shell "${path}"); do
echo "${argument}/${file}"
done
elif [ -f "${path}" ]; then
echo "${argument}"
fi
done
}
rwx_self_write() {
local target="${1}"
if [ -n "${target}" ]; then
shift
local file text
text="#! /usr/bin/env sh
"
rwx_ifs_set
for file in $(rwx_self_subset "${@}"); do
text="${text}
$(cat "${RWX_ROOT_SYSTEM}/${file}")
"
done
rwx_ifs_unset
rwx_file_write "${target}" "${text}"
rwx_shfmt "${target}"
rwx_shellcheck_file "${target}"
fi
}

116
sh/shell.sh Normal file
View file

@ -0,0 +1,116 @@
_rwx_shell_color() {
local code="${1}"
case "${RWX_SHELL}" in
"bash")
printf "\x01\e[0"
if [ -n "${code}" ]; then
printf "%s" ";${code}"
fi
printf "m\x02"
;;
*)
printf "\033["
if [ -n "${code}" ]; then
printf "%s" "${code}"
else
printf "0"
fi
printf "m"
;;
esac
}
RWX_COLOR_BROWN="$(_rwx_shell_color 33)"
RWX_COLOR_CYAN="$(_rwx_shell_color 36)"
RWX_COLOR_DEFAULT="$(_rwx_shell_color)"
RWX_COLOR_GREEN="$(_rwx_shell_color 31)"
RWX_COLOR_MAGENTA="$(_rwx_shell_color 35)"
RWX_COLOR_RED="$(_rwx_shell_color 32)"
rwx_shell_configure() {
[ -n "${ENV}" ] || ENV="${RWX_MAIN_PATH}"
export ENV
# prompt
PS1="\$(rwx_shell_prompt \${?})"
PS2="├ "
# specific
case "${RWX_SHELL}" in
"bash")
# completion
local root="/usr/share/bash-completion"
local file="bash_completion"
local path="${root}/${file}"
# shellcheck disable=SC1090
[ -f "${path}" ] && . "${path}"
root="${root}/completions"
if [ -d "${root}" ]; then
set \
"git" \
"tar"
for file in "${@}"; do
path="${root}/${file}"
# shellcheck disable=SC1090
[ -f "${path}" ] && . "${path}"
done
fi
# history
HISTCONTROL="ignorespace"
HISTSIZE=-1
HISTTIMEFORMAT="%Y%m%d %H%M%S "
;;
*) ;;
esac
}
rwx_shell_configure
rwx_shell_prompt() {
local date host id
local code="${1}"
date="$(date +%H:%M:%S)"
local git
host="$(hostname)"
id="$(id --user)"
local path="${PWD}"
local user="${USER}"
local view="└ "
# code
if [ "${code}" -ne 0 ]; then
view="${view}${RWX_COLOR_GREEN}"
else
view="${view}${RWX_COLOR_RED}"
fi
view="${view}${code}"
# date
view="${view}${RWX_COLOR_DEFAULT} @ "
view="${view}${RWX_COLOR_BROWN}${date}"
# git
if command -v "__git_ps1" >"/dev/null"; then
git="$(__git_ps1)"
if [ -n "${git}" ]; then
view="${view}${RWX_COLOR_DEFAULT}${RWX_COLOR_MAGENTA}${git}"
fi
fi
# new
view="${view}\\n"
# path
view="${view}${RWX_COLOR_CYAN}${path}"
# new
view="${view}\\n"
# frame
view="${view}${RWX_COLOR_DEFAULT}"
# user
if [ "${id}" -eq 0 ]; then
view="${view}${RWX_COLOR_GREEN}"
else
view="${view}${RWX_COLOR_RED}"
fi
view="${view}${user}"
# host
view="${view}${RWX_COLOR_DEFAULT} @ "
view="${view}${RWX_COLOR_BROWN}${host}"
# new
view="${view}\\n"
# prompt
view="${view}${RWX_COLOR_DEFAULT}${PS2}"
# print
printf "%b" "${view}"
}

76
sh/util.sh Normal file
View file

@ -0,0 +1,76 @@
rwx_file_append() {
local file="${1}"
local text="${2}"
if [ -n "${file}" ]; then
printf "%s" "${text}" >>"${file}"
fi
}
rwx_file_empty() {
local file="${1}"
if [ -n "${file}" ]; then
rwx_file_write "${file}" ""
fi
}
rwx_file_write() {
local file="${1}"
local text="${2}"
if [ -n "${file}" ]; then
printf "%s" "${text}" >"${file}"
fi
}
rwx_link() {
local link="${1}"
local target="${2}"
ln \
--symbolic \
"${target}" \
"${link}"
}
rwx_list_block_devices() {
lsblk \
--noempty \
--output "NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINTS"
}
rwx_not() {
case "${1}" in
"false") echo "true" ;;
"true") echo "false" ;;
*) ;;
esac
}
rwx_read_passphrase() {
rwx_read_secret "PassPhrase: "
}
rwx_read_secret() {
local prompt="${1}"
local secret
printf "%s" "${prompt}" 1>&2
stty -echo
read -r secret
stty echo
echo >&2
echo "${secret}"
unset secret
}
rwx_remove() {
rm \
--force \
--recursive \
"${@}"
}
rwx_warn_wipe() {
local tmp
rwx_list_block_devices
printf "%s" "WIPE ${*} /?\\ OR CANCEL /!\\"
read -r tmp
rwx_log_trace "${tmp}"
}