diff options
author | simona | 2020-11-01 15:58:59 +0100 |
---|---|---|
committer | simona | 2020-11-01 15:58:59 +0100 |
commit | 1be2fa189211816f275805d83d8d6a73e72ac52a (patch) | |
tree | dd924832311c1345d7788d3644241ae85b9a52d9 /simonas-scripts | |
download | aur-simonas-scripts.tar.gz |
start
Diffstat (limited to 'simonas-scripts')
-rwxr-xr-x | simonas-scripts | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/simonas-scripts b/simonas-scripts new file mode 100755 index 000000000000..e99d58663132 --- /dev/null +++ b/simonas-scripts @@ -0,0 +1,60 @@ +#!/bin/bash +# Simona Pisano - 2018-11-18 - +# simonas-scripts +# Libertamente utilizzabile sotto GPL v3 + +if [[ $1 == "-h" || $1 == "--help" || $1 == "list" || $1 == "" ]] ; then + + cat << EOF +simonas-scripts - GPL v3 license +image-mount - image - mount a big amount of image file (use -h for a full list) +image-umount - imageu - related to image-mount. umount all what mounted +pendrive-detect - pendrive - detect a pendrive, size, full device +ioscheduler-list - iosched - list scheduler for all block devices +boot-kernel-list - boot - list kernels inside /boot, extract version (lile uname -r), say what is used in recent boot +uuid-change - uuid - change uuid of a volume +macinstall - install id files (commanded by config file) +exchange-info - change euro dollar and diff with previouos day + +EOF + + + exit +elseif [[ $1 == "--version" ]] + echo "simona-scripts Version 0.0" + exit +fi + +case $1 in +image|imageu|pendrive|ioched|boot) + case $1 in + image) launch="image-mount" ;; + imageu) launch="image-umount" ;; + pendrive) launch="pendrive-detect" ;; + ioched) launch="ioscheduler-list" ;; + boot) launch="boot-kernel-list" ;; + uuid) launch="uuid-change" ;; + *) ;; + esac + ;; +image-mount|image-umount|pendrive-detect|ioscheduler-list|boot-kernel-list|uuid-change|exchange-info) + launch=$1 + ;; +*) + echo "Sorry, but this one is not a known simonascript bash script." + launch="" + ;; +esac + +if [[ $launch != "" ]] ; then + if [[ -r /bin/$launch ]] ; then + echo "Launch '$launch'..." + shift + #. "$launch" + exec "$launch" "$@" + else + echo "Installed package 'simonas-script' is damaged. Script is unavailable. Please reinstall." + fi +fi + + |