thetumultuousunicornofdarkness / dmg2dir Goto Github PK
View Code? Open in Web Editor NEWA Bash script which extract macOS application from DMG file
A Bash script which extract macOS application from DMG file
$ sudo make install
msgfmt po/fr.po -o po/dmg2dir_fr.mo
make: msgfmt: No such file or directory
make: *** [Makefile:14: po] Error 127
That's error.
The udisk commands use 2&>1
, presumably to redirect stderr to stdout.
https://github.com/X0rg/dmg2dir/blob/b8340f200744af5769602e2f7bba2cf96050ee23/dmg2dir#L60
https://github.com/X0rg/dmg2dir/blob/b8340f200744af5769602e2f7bba2cf96050ee23/dmg2dir#L63
Should be 2>&1
. Current format creates a file called 1
with the contents of stderr.
First, thanks for this handy piece of software!
Environment:
Issues:
Example of the above (the disk by label variable check already disabled):
dmg2dir -w -n macOS_10.12.6_Sierra -p /home/user/example/macos_img -t /home/user/example/macos_img_tmp -d /home/user/example/macos_img_src/MacOS_Sierra_v10.12.6_Final/'MacOS_Sierra_v10.12.6_Final[16G29].dmg'
-> List devices labels
ls: cannot access '/dev/disk/by-label': No such file or directory
-> Set up loop-device
Mapped file /home/user/example/macos_img_tmp/macOS_10.12.6_Sierra.img as /dev/loop0.
-> Retrieve loop device name
/dev/loop0
-> Relist devices labels
macOS 10.12.6_(16G29)_[MAS]_MAC-RU.NET
-> Get label from lists differences
macOS 10.12.6_(16G29)_[MAS]_MAC-RU.NET
-> Set application directory
/home/user/example/macos_img/macOS_10.12.6_Sierra
==> Mount block device...
Mounted /dev/loop0p2 at /run/media/user/macOS 10.12.6_(16G29)_[MAS]_MAC-RU.NET.
/run/media/user/macOS0.12.6_(16G29)_[MAS]_MAC-RU.NET
==> Generate ISO file...
genisoimage: Warning: assuming PC Exchange cluster size of 512 bytes
Setting input-charset to 'UTF-8' from locale.
3.02a09 (x86_64-unknown-linux-gnu)
genisoimage: No such file or directory. Invalid node - '/run/media/user/macOS0.12.6_(16G29)_[MAS]_MAC-RU.NET'.
No output file found.
Error 50 has occured.
Note the /run/media/user/macOS0.12.6_(16G29)_[MAS]_MAC-RU.NET
that should be /run/media/user/macOS 10.12.6_(16G29)_[MAS]_MAC-RU.NET
.
Looks like the $mountpont variable in mountimg() gets the wrong value.
I had to move past it quickly. Hardcoding the correct path in the convertiso() function solves it.
genisoimage: Value too large for defined data type. File /run/media/user/macOS 10.13.6 High Sierra/Install macOS High Sierra.app/Contents/SharedSupport/InstallESD.dmg is too large for current mkisofs settings (-iso-level 3 or more required) - ignoring
Perhaps
$geniso $v -V "$name" -R -probe -g -o "$app_directory.iso" "$mountpoint"
should be something like (untested for actual ISO functionality, but it does get it built):
$geniso $v -V -iso-level 3 -UDF "$name" -R -probe -g -o "$app_directory.iso" "$mountpoint"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.