mirror of
https://github.com/YunoHost/cd_build.git
synced 2024-09-03 20:06:24 +02:00
Replace mount by xorriso (#4)
Because that fucking lxd doesn't want to allow to mount an iso...
This commit is contained in:
parent
e9605c97fe
commit
a1cd1958ba
1 changed files with 1 additions and 19 deletions
|
@ -111,28 +111,10 @@ fi
|
||||||
|
|
||||||
if is_iso "$file"; then
|
if is_iso "$file"; then
|
||||||
isotmp="$(mktemp -d)"
|
isotmp="$(mktemp -d)"
|
||||||
tmpmnt="$isotmp/tmpmnt"
|
|
||||||
buildtree="$isotmp/buildtree"
|
buildtree="$isotmp/buildtree"
|
||||||
BUILD_DIR=$(pwd)
|
BUILD_DIR=$(pwd)
|
||||||
|
|
||||||
mkdir "$tmpmnt"
|
xorriso -osirrox on -indev "$file" -extract / "$buildtree"
|
||||||
if am_root; then
|
|
||||||
MOUNT="mount"
|
|
||||||
UMOUNT="umount"
|
|
||||||
elif [ -x /usr/bin/sudo ]; then
|
|
||||||
echo "Attempting to use sudo to gain mount capabilities..."
|
|
||||||
MOUNT="sudo mount"
|
|
||||||
UMOUNT="sudo umount"
|
|
||||||
else
|
|
||||||
echo "WARNING: Couldn't find sudo and not running as root." >&2
|
|
||||||
echo "WARNING: Trying to loopback mount the iso anyway..." >&2
|
|
||||||
MOUNT="mount"
|
|
||||||
UMOUNT="umount"
|
|
||||||
fi
|
|
||||||
$MOUNT "$file" "$tmpmnt" -o loop
|
|
||||||
cp -a "$tmpmnt" "$buildtree"
|
|
||||||
$UMOUNT "$tmpmnt"
|
|
||||||
rmdir "$tmpmnt"
|
|
||||||
|
|
||||||
chmod -R u+w "$buildtree"
|
chmod -R u+w "$buildtree"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue