Skip to content

Commit

Permalink
v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jsamr committed Apr 10, 2018
1 parent 3503b03 commit c0a392e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
58 changes: 29 additions & 29 deletions bootiso
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Author: jules randolph <[email protected]> https://github.com/jsamr
# License: MIT
# Version 2.3.0
# Version 2.3.1
#
# Usage: [<options>...] <file.iso>
#
Expand Down Expand Up @@ -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 [<options>...] <file.iso>
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.3.1

- fix wrong file redirections

# v2.3.0

- add `-l`, `--list-usb-drives` option
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit c0a392e

Please sign in to comment.