-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·28 lines (20 loc) · 759 Bytes
/
install.sh
File metadata and controls
executable file
·28 lines (20 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e
PREFIX=${1:-"/opt/anylinuxfs"}
# sudo mkdir -p "$PREFIX"
mkdir -p "$PREFIX/bin"
mkdir -p "$PREFIX/libexec"
# sudo chown $(whoami):admin "$PREFIX"
cp bin/* "$PREFIX/bin/"
function fix_libkrun_path() {
install_name_tool -change \
/usr/local/lib/libkrun.dylib \
"$PREFIX/lib/libkrun.dylib" "$1" 2>/dev/null
}
# not needed when using libkrun from homebrew
# fix_libkrun_path "$PREFIX/bin/anylinuxfs"
# codesign --entitlements "anylinuxfs.entitlements" --force -s - "$PREFIX/bin/anylinuxfs"
cp -RL libexec/* "$PREFIX/libexec/"
# not needed when using libkrun from homebrew
# fix_libkrun_path "$PREFIX/libexec/init-rootfs"
# codesign --entitlements "anylinuxfs.entitlements" --force -s - "$PREFIX/libexec/init-rootfs"