diff options
author | Soispha <soispha@vhack.eu> | 2023-05-28 22:13:25 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-05-28 22:13:25 +0200 |
commit | df2e5904b9060d7b39f7ade123d1f5912dbeb06f (patch) | |
tree | 1107ea237ee28c221c76cf9e6cbd0bb1d9cc49d7 /home-manager/packages/scripts/apps | |
parent | Docs(hm/wms/river/init): Add a hint to simplify script (diff) | |
download | nixos-config-df2e5904b9060d7b39f7ade123d1f5912dbeb06f.tar.gz nixos-config-df2e5904b9060d7b39f7ade123d1f5912dbeb06f.zip |
Fix(hm/pkgs/scrs): Rework some of them
Diffstat (limited to 'home-manager/packages/scripts/apps')
-rwxr-xr-x | home-manager/packages/scripts/apps/aumo | 8 | ||||
-rwxr-xr-x | home-manager/packages/scripts/apps/con2pdf | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/home-manager/packages/scripts/apps/aumo b/home-manager/packages/scripts/apps/aumo index 2a1054ad..a35a9de5 100755 --- a/home-manager/packages/scripts/apps/aumo +++ b/home-manager/packages/scripts/apps/aumo @@ -3,7 +3,9 @@ # shellcheck source=/dev/null SHELL_LIBRARY_VERSION="1.1.3" . %SHELL_LIBRARY_PATH -if [ "$1" = "-u" ];then udisksctl unmount -b $(cat $HOME/.cache/aumo/mnt_disk); exit 0; fi +# TODO rewrite this + +if [ "$1" = "-u" ];then udisksctl unmount -b "$(cat "$HOME/.cache/aumo/mnt_disk")"; exit 0; fi all_available_disks=$(mktemp) awk '{print $4}' /proc/partitions | sed '1 s|.*||' > "$all_available_disks" @@ -29,7 +31,7 @@ while [ $disk -lt 0 ] || [ $disk -gt $(wc -l $unmounted_disks | awk '{print $1}' printf "%4s) %s\n" "$u" "$i" u=$(( u + 1 )) done - + printf "%4s) Exit\n" "0" printf "Input number: " read -r disk @@ -44,7 +46,7 @@ if ! [ "$1" = "-v" ] && [ -n "$1" ];then sudo mount "$mnt_disk" "$1" && exit 0;f [ -n "$2" ] && sudo mount "$mnt_disk" "$1" && exit 0 if mount | grep -q ~/mnt ;then dien "Something is mounted at ~/mnt";else udisksctl mount -b "$mnt_disk";fi -[ -e $HOME/.cache/aumo/mnt_disk ] || mkdir -p $HOME/.cache/aumo +[ -e $HOME/.cache/aumo/mnt_disk ] || mkdir -p $HOME/.cache/aumo echo $mnt_disk >> $HOME/.cache/aumo/mnt_disk rm $all_available_disks rm $mounted_disk diff --git a/home-manager/packages/scripts/apps/con2pdf b/home-manager/packages/scripts/apps/con2pdf index 653af5cb..29e9bc16 100755 --- a/home-manager/packages/scripts/apps/con2pdf +++ b/home-manager/packages/scripts/apps/con2pdf @@ -11,7 +11,6 @@ AUTHORS="Soispha"; YEARS="2023"; # shellcheck disable=2034 VERSION="1.0.0"; -NAME="con2pdf"; help() { cat << EOF |