From c0a392e44c4640f81032f7e6293e23604418cee9 Mon Sep 17 00:00:00 2001 From: Jules Randolph Date: Mon, 9 Apr 2018 20:28:10 -0400 Subject: [PATCH] v2.3.1 --- bootiso | 58 ++++++++++++++++++++++++++-------------------------- changelog.md | 4 ++++ readme.md | 2 +- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/bootiso b/bootiso index fbeaf01..8ac67bb 100755 --- a/bootiso +++ b/bootiso @@ -2,7 +2,7 @@ # Author: jules randolph https://github.com/jsamr # License: MIT -# Version 2.3.0 +# Version 2.3.1 # # Usage: [...] # @@ -76,7 +76,7 @@ typeset shouldMakeFAT32Partition=true typeset ejectDevice=true typeset autoselect=false -typeset version="2.3.0" +typeset version="2.3.1" typeset help_message="\ Usage: $scriptName [...] @@ -134,28 +134,28 @@ initPckgManager() { if [ ! -z "$(which apt-get)" ]; then # Debian pkgmgr="apt-get -y install" return 0 -fi -if [ ! -z "$(which dnf)" ]; then # Fedora -pkgmgr="dnf -y install" -return 0 -fi -if [ ! -z "$(which yum)" ]; then # Fedora -pkgmgr="yum -y install" -return 0 -fi -if [ ! -z "$(which pacman)" ]; then # Arch -pkgmgr="pacman -S" -return 0 -fi -if [ ! -z "$(which zypper)" ]; then # OpenSuse -pkgmgr="zypper install" -return 0 -fi -if [ ! -z "$(which emerge)" ]; then # Gentoo -pkgmgr="emerge" -return 0 -fi -return 1 + fi + if [ ! -z "$(which dnf)" ]; then # Fedora + pkgmgr="dnf -y install" + return 0 + fi + if [ ! -z "$(which yum)" ]; then # Fedora + pkgmgr="yum -y install" + return 0 + fi + if [ ! -z "$(which pacman)" ]; then # Arch + pkgmgr="pacman -S" + return 0 + fi + if [ ! -z "$(which zypper)" ]; then # OpenSuse + pkgmgr="zypper install" + return 0 + fi + if [ ! -z "$(which emerge)" ]; then # Gentoo + pkgmgr="emerge" + return 0 + fi + return 1 } checkSudo() { @@ -429,10 +429,10 @@ partitionUSB() { if shouldWipeUSBKey; then echo "Erasing contents of $selectedDevice..." # unmount any partition - umount "$selectedDevice" 2&> /dev/null || true; - umount "$selectedDevice"? 2&> /dev/null || true; + umount "$selectedDevice" &> /dev/null || true; + umount "$selectedDevice"? &> /dev/null || true; # clean signature from selected device - wipefs --all --force "$selectedDevice" 2&> /dev/null + wipefs --all --force "$selectedDevice" &> /dev/null # erase drive dd if=/dev/zero of="$selectedDevice" bs=512 count=1 conv=notrunc status=none || failAndExit "Failed to erase USB device.\\nIt's likely that the device has been ejected and needs to be plugged-in again manually." sync @@ -489,7 +489,7 @@ syncWithProgress() { rsyncWithProgress() { typeset -i i=1 typeset statusFile=$(mktemp) - (rsync -r -q -I --no-links --no-perms --no-owner --no-group "$isoMountPoint"/. "$usbMountPoint"; echo "$?" > "$statusFile") & 2&>/dev/null + (rsync -r -q -I --no-links --no-perms --no-owner --no-group "$isoMountPoint"/. "$usbMountPoint"; echo "$?" > "$statusFile") & pid=$! echo -n "Copying files from ISO to USB device with \`rsync' " while [ -e "/proc/$pid" ]; do @@ -628,7 +628,7 @@ cleanup() { fi fi if [ "$ejectDevice" == 'true' ]; then - if eject "$selectedDevice" 2&> /dev/null; then + if eject "$selectedDevice" &> /dev/null; then echogood "USB device succesfully ejected." echogood "You can safely remove it !" fi diff --git a/changelog.md b/changelog.md index 221f1ad..5764c86 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# v2.3.1 + +- fix wrong file redirections + # v2.3.0 - add `-l`, `--list-usb-drives` option diff --git a/readme.md b/readme.md index 3d84ae8..b78ca1a 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,5 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![v2.3.0](https://img.shields.io/badge/version-v2.3.0-green.svg)](#) +[![v2.3.1](https://img.shields.io/badge/version-v2.3.1-green.svg)](#) [![GitHub issues open](https://img.shields.io/github/issues/jsamr/bootiso.svg?maxAge=2592000)](https://github.com/jsamr/bootiso/issues) [![Build Status](https://travis-ci.org/jsamr/bootiso.svg?branch=master)](https://travis-ci.org/jsamr/bootiso)