3 Commits
Author SHA1 Message Date
ValdikSS 208609e09c Fix detection of install.wim > 4GiB 2018-05-07 19:23:56 +03:00
ValdikSS 618f507a0a Handle relative paths before running pkexec
Fixes #1
2018-05-05 02:33:06 +03:00
ValdikSS b2977a144b README update 2018-05-01 13:57:44 +03:00
2 changed files with 9 additions and 3 deletions
+2
View File
@@ -21,6 +21,8 @@ Download latest [portable AppImage version](https://github.com/ValdikSS/windows2
The program prints removable storage list if no arguments supplied.
If you don't want to use AppImage, you'll need to install all dependencies and download [uefi-ntfs.img](https://github.com/pbatard/rufus/tree/master/res/uefi) from Rufus project.
### BIOS Boot
BIOS Boot (Legacy Boot/UEFI-CSM) uses stock Windows 7 MBR and NTFS bootloader, courtesy of [ms-sys](http://ms-sys.sourceforge.net/) project.
+7 -3
View File
@@ -40,7 +40,7 @@ function format_drive() {
}
function check_installwim_gt4gib() {
7z l "$1" | awk '($6 ~ /install.wim/) {if ($4 > 429496296) {exit 1}; exit}'
7z l "$1" | awk '($6 ~ /install.wim/) {if ($4 > 4294967296) {exit 0}; exit 1}'
}
function create_partitions() {
@@ -226,12 +226,16 @@ else
if [[ "$APPIMAGE" ]];
then
scriptpath="$APPIMAGE"
fi;
fi
[ -f "$1" ] && PARAM1="$(readlink -f -- "$1")" || PARAM1="$1"
[ -f "$2" ] && PARAM2="$(readlink -f -- "$2")" || PARAM2="$2"
shift; shift;
privescs=(pkexec sudo)
for privesc in ${privescs[*]}; do
if command -v "$privesc" > /dev/null; then
"$privesc" "$scriptpath" "$@"
"$privesc" "$scriptpath" "$PARAM1" "$PARAM2" "$@"
exit
fi
done