summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimona2018-11-25 21:27:58 +0100
committersimona2018-11-25 21:27:58 +0100
commitdfcda390b7ffb5cee4956c52fbd849ff4bbd6df8 (patch)
tree240e43939f63b9e8fd271f7c3f7cec493404b5ff
parentb9927be37b822d176ba555da5ed1cdb925373bc6 (diff)
downloadaur-dfcda390b7ffb5cee4956c52fbd849ff4bbd6df8.tar.gz
man, changelog, other small fixes
-rw-r--r--.SRCINFO11
-rwxr-xr-xPKGBUILD16
-rwxr-xr-ximage-mount40
-rw-r--r--image-mount.136
-rwxr-xr-ximage-umount7
-rwxr-xr-xsimona-scripts3
-rw-r--r--simonascripts.changelog11
7 files changed, 91 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 26ac09df8fef..9a159f8b6c0f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,8 @@
pkgbase = simonascripts
pkgdesc = Bash unique command for mount image files (iso, vms, crypto, squashfs), detect pendrive device name, list all kernels, list all i/o schedulers.
- pkgver = 0.0.6
+ pkgver = 0.0.7
pkgrel = 1
+ changelog = simonascripts.changelog
arch = any
license = GPL3
depends = bash
@@ -15,12 +16,14 @@ pkgbase = simonascripts
source = ioscheduler-list
source = pendrive-detect
source = simona-scripts
+ source = image-mount.1
md5sums = 3f5599c3588f01b625aa9feb0a0e8b99
- md5sums = f2f968bde9938365374ad7ee9c9c993d
- md5sums = b9ab4d94a9a7a5003c86d5f3f067372c
+ md5sums = f99175498dea55c7055a46bb8fb5e7f2
+ md5sums = 717e3391e87f5cda39ebd9a2cc2e943d
md5sums = c58f5737bb41c8af2bff7dd24a3d2723
md5sums = 6379f2d72a7f197961f7d10bf428d667
- md5sums = aefb9199ab29aed2539da55a9bd0c217
+ md5sums = a1a4360c53f748f61af34e438f261e5a
+ md5sums = feb575e006d53e485c73a1ab4a758eeb
pkgname = simonascripts
diff --git a/PKGBUILD b/PKGBUILD
index 81d34a1a3707..c940353852c8 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,12 @@
# Maintainer: Simona <simona.pisano[at]gmail[dot]com>
pkgname=simonascripts
-pkgver=0.0.6
+pkgver=0.0.7
pkgrel=1
pkgdesc="Bash unique command for mount image files (iso, vms, crypto, squashfs), detect pendrive device name, list all kernels, list all i/o schedulers."
+#t does not need to be included in the source array
+changelog=$pkgname.changelog
+
arch=('any')
license=('GPL3')
@@ -18,14 +21,16 @@ source=( "boot-kernel-list"
"image-umount"
"ioscheduler-list"
"pendrive-detect"
- "simona-scripts" )
+ "simona-scripts"
+ "image-mount.1" )
md5sums=('3f5599c3588f01b625aa9feb0a0e8b99'
- 'f2f968bde9938365374ad7ee9c9c993d'
- 'b9ab4d94a9a7a5003c86d5f3f067372c'
+ 'f99175498dea55c7055a46bb8fb5e7f2'
+ '717e3391e87f5cda39ebd9a2cc2e943d'
'c58f5737bb41c8af2bff7dd24a3d2723'
'6379f2d72a7f197961f7d10bf428d667'
- 'aefb9199ab29aed2539da55a9bd0c217')
+ 'a1a4360c53f748f61af34e438f261e5a'
+ 'feb575e006d53e485c73a1ab4a758eeb')
package() {
cd "$srcdir"
@@ -35,6 +40,7 @@ package() {
install -Dm 755 "$srcdir/image-umount" "$pkgdir/usr/bin/image-umount"
install -Dm 755 "$srcdir/boot-kernel-list" "$pkgdir/usr/bin/boot-kernel-list"
install -Dm 755 "$srcdir/ioscheduler-list" "$pkgdir/usr/bin/ioscheduler-list"
+ install -Dm 644 "$srcdir/image-mount.1" "$pkgdir/usr/share/man1/image-mount.1"
}
diff --git a/image-mount b/image-mount
index 4c526e072f12..06a4ffa5eef9 100755
--- a/image-mount
+++ b/image-mount
@@ -2,13 +2,11 @@
# Simona Pisano - 2018-11-18 -
# simona-scripts
# Libertamente utilizzabile sotto GPL v3
+#srun-mount-img() {
- #srun-mount-img() {
+#to-do add input parameters
- #to-do add sqash images
- #to-do add input parameters
- #echo -n "Continue? (Y/N): "; read confirm; [[ ! $confirm == [Yy]* ]] && echo "no" #exit 1
- #echo -n "Continue? (Y/N): "; read ok; [[ ! $ok =~ ^(yes|y|YES|y|s|S|si|SI|sì)$ ]] && echo "no" #exit 1
+[[ $1 == "" ]] && exit 0 #TO-DO attivare invece la richiesta dei parametri?
#color Foreground Background
#black 30 40
@@ -19,20 +17,6 @@
#magenta 35 45
#cyan 36 46
#white 37 47
-#
-#black='\E[30;47m'
-#red='\E[31;47m'
-#green='\E[32;47m'
-#yellow='\E[33;47m'
-#blue='\E[34;47m'
-#magenta='\E[35;47m'
-#cyan='\E[36;47m'
-#white='\E[37;47m'
-#"\e[1;39;41m" "\e[0m "
-#echo -e
-
-[[ $1 == "" ]] && exit 0
-
EchoReset="\e[0m"
echo -e -n "$EchoReset"
OK="\E[32;40m[OK]${EchoReset}"
@@ -54,8 +38,9 @@ image-mount command help
Usage
image-mount [--help|-h]"
- image-mount [path/]file-name.ext] [format | part#] [mount-path | part#] [--force-iso-stdmount]
+ image-mount [path/]file-name[.format] [format | #partition] [path-where-mount | #partition] [--force-iso-stdmount]
--force-iso-stdmount -> force in iso sudo mount 'mount -o loop' instead 'fuseiso'
+ -y --ask-confirm -> ask confirm
Warnings
1) part# in in format 0-9 with one integer value
@@ -82,6 +67,9 @@ Squash readonly file (can ben modified, saved on umount) (package 'squashfs-tool
EOF
exit 0
+elseif [[ $1 == "--version" ]] ; then
+ echo "image-mount Version 0.0 (simonascripts package)"
+ exit 0
fi
# DEFAULTS -------------------------------------------------------------------------------------------------------------
@@ -134,15 +122,23 @@ par=$4; [[ $4 != "" && ${par:0:1} != "-" ]] && mount_where=$4
[[ -d "$mount_where/$image" ]] && { echo -e "$ERR $image found. umount/rm -r \"$mount_where/$image\". Exit."; exit 1; }
forceIsoStdMount=false #default par
+flagAskConfirm=false
while [ $# -ne 0 ] ; do
- arg="$1"
- case "$arg" in
+ case $1 in
--force-iso-stdmount) forceIsoStdMount=true ;;
+ -y|--ask-confirm) flagAskConfirm=true ;;
*) ;;
esac
shift
done
+echo "Now mounting image <$image> format <$format> on path <$mount_where>, partition number <$n_part>."
+if [[ "$flagAskConfirm" == true ]] ; then
+ echo -n "Continue? (Y/N): "; read ok
+ [[ ! $ok =~ ^(yes|y|YES|y|s|S|si|SI|sì)$ ]] && { echo "Exit forced by user."; exit 0; }
+fi
+
+
# ------------------------------------------------------------------------------------------------------------------------
# WORK -------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------------------------------
diff --git a/image-mount.1 b/image-mount.1
new file mode 100644
index 000000000000..9486da9bd2ef
--- /dev/null
+++ b/image-mount.1
@@ -0,0 +1,36 @@
+NAME
+image-mount - Bash script to mount image files (iso, vms, crypto, squashfs) inside simonascripts pkg
+SYNOPSIS
+image-mount image-mount [path/]file-name[.format] [format | #partition] [path-where-mount | #partition] [--force-iso-stdmount]
+DESCRIPTION
+Bash script to mount image files (iso, vms, crypto, squashfs) inside simonascripts pkg
+
+-h, --help
+ display this help and exit
+
+--force-iso-stdmount
+ force in iso sudo mount 'mount -o loop' instead 'fuseiso'
+
+-y, --ask-confirm
+ confirm before execute
+
+--version
+ output version information and exit
+
+
+AUTHOR
+Written by Simona Pisano.
+
+REPORTING BUGS
+Report to Simona <simona.pisano[at]gmail[dot]com>
+
+COPYRIGHT
+Copyright © 2018 Simona Pisano. License GPLv3: GNU GPL version 3 <https://gnu.org/licenses/gpl.html>.
+
+SEE ALSO
+image-umount, simona-scripts.
+
+This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
+SEE ALSO
+Full documentation at: <https://>
+
diff --git a/image-umount b/image-umount
index 7b78ed7b348c..2d371e927f66 100755
--- a/image-umount
+++ b/image-umount
@@ -4,6 +4,8 @@
# Libertamente utilizzabile sotto GPL v3
#srun-umount-img() {
+[[ $1 == "" ]] && exit 0 #TO-DO attivare invece la richiesta dei parametri?
+
EchoReset="\e[0m"
echo -e -n "$EchoReset"
OK="\E[32;40m[OK]${EchoReset}"
@@ -11,8 +13,6 @@ WARN="\E[33;40m[OK]${EchoReset}"
ERR="\E[31;40m[OK]${EchoReset}"
#echo -e "$OK $WARN $ERR"
-[[ $1 == "" ]] && exit 0
-
if [[ $1 == "-h" || $1 == "--help" ]] ; then
cat << EOF
image-umount command help
@@ -37,6 +37,9 @@ Typical usage:
image-umount file.ext 2
EOF
exit 0
+elseif [[ $1 == "--version" ]] ; then
+ echo "image-umount Version 0.0 (simonascripts package)"
+ exit 0
fi
# ------------------------------------------------------------------------------------------------------------------------
diff --git a/simona-scripts b/simona-scripts
index f31e6cadb60a..81a903ddd7fd 100755
--- a/simona-scripts
+++ b/simona-scripts
@@ -13,6 +13,9 @@ 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
EOF
exit
+elseif [[ $1 == "--version" ]] ; then
+ echo "simona-scripts Version 0.0"
+ exit
fi
case $1 in
diff --git a/simonascripts.changelog b/simonascripts.changelog
new file mode 100644
index 000000000000..6da1c8d9ef1c
--- /dev/null
+++ b/simonascripts.changelog
@@ -0,0 +1,11 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+## [0.0.1] - 2018-11-18
+## First Release
+
+### Added
+
+### Changed
+
+### Removed