mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
22 lines
359 B
Plaintext
22 lines
359 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
case $# in
|
||
|
0) target=./bootbus;;
|
||
|
1) target=$1;;
|
||
|
*) echo "Usage: $0 [target]" >&2
|
||
|
exit 1;;
|
||
|
esac
|
||
|
|
||
|
if [ -e "$target" ]
|
||
|
then echo "Target directory '$target' already exists." >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
pkg=$(nix-build nix/ops -A bootbus --no-out-link)
|
||
|
|
||
|
mkdir -p "$(dirname "$target")"
|
||
|
cp -L -r $pkg/ $target
|
||
|
chmod -R u+rw $target
|