mirror of
https://github.com/lisanet/PiShrink-macOS.git
synced 2025-12-23 18:50:09 +00:00
add a helper script to build the e2fs tools we need.
This commit is contained in:
parent
97181f9a21
commit
ea26712efe
@ -10,12 +10,14 @@
|
||||
FC4E6AAC2058556E00CBFDDA /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
|
||||
FC4E6AAD2058556E00CBFDDA /* pishrink.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = pishrink.sh; sourceTree = "<group>"; };
|
||||
FC4E6AAE2058556E00CBFDDA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
|
||||
FC7662F520586426003556C0 /* make_e2fstools */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = make_e2fstools; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
FC4E6AA1205854F700CBFDDA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FC7662F520586426003556C0 /* make_e2fstools */,
|
||||
FC4E6AAC2058556E00CBFDDA /* LICENSE */,
|
||||
FC4E6AAD2058556E00CBFDDA /* pishrink.sh */,
|
||||
FC4E6AAE2058556E00CBFDDA /* README.md */,
|
||||
|
||||
47
make_e2fstools
Executable file
47
make_e2fstools
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
# make_e2fstools
|
||||
# PiShrink-macOS
|
||||
#
|
||||
# Created by Simone Karin Lehmann on 13.03.18.
|
||||
# Copyright © 2018 LisaNet, BSD 2 clause license
|
||||
#
|
||||
|
||||
### functions
|
||||
download ()
|
||||
{
|
||||
cd "$PACKAGES"
|
||||
down_FILE=$(basename "$1")
|
||||
test -e "$down_FILE" || curl -LO "$1"
|
||||
cd "$CMPL"
|
||||
tar -xzf "$PACKAGES/$down_FILE"
|
||||
}
|
||||
|
||||
BASE=$(pwd)
|
||||
PACKAGES="/Volumes/Ramdisk/packages"
|
||||
TARGET="/Volumes/Ramdisk/sw"
|
||||
CMPL="/Volumes/Ramdisk/compile"
|
||||
export CC=clang
|
||||
|
||||
### create RAM disk
|
||||
if [ ! -e "/Volumes/Ramdisk" ]; then
|
||||
DEVICE=$(hdiutil attach -nomount ram://2048000)
|
||||
newfs_hfs -v Ramdisk $DEVICE
|
||||
diskutil mount $DEVICE
|
||||
fi
|
||||
|
||||
### set up dirs
|
||||
mkdir "$PACKAGES"
|
||||
mkdir "$TARGET"
|
||||
mkdir "$CMPL"
|
||||
|
||||
download https://netix.dl.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.44.0/e2fsprogs-1.44.0.tar.gz
|
||||
cd e2fs*
|
||||
./configure --prefix "$TARGET" --disable-nls
|
||||
make
|
||||
cp -a e2fsck/e2fsck "$BASE"
|
||||
cp -a resize/resize2fs "$BASE"
|
||||
cp -a misc/tune2fs "$BASE"
|
||||
|
||||
cd "$BASE"
|
||||
diskutil eject "/Volumes/Ramdisk"
|
||||
Loading…
x
Reference in New Issue
Block a user