generated from Patryk27/kartoffel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·35 lines (28 loc) · 813 Bytes
/
build
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
29
30
31
32
33
34
35
#!/usr/bin/env bash
set -e
cargo build --release
cp ./target/riscv64-kartoffel-bot/release/kartoffel-bot kartoffel
if [[ "$1" == "--copy" ]]; then
# Mac
if [[ -x "$(command -v pbcopy)" ]]; then
base64 -i kartoffel | pbcopy
exit
fi
# Wayland
if [[ -x "$(command -v wl-copy)" ]]; then
base64 kartoffel | wl-copy
exit
fi
# Xorg
if [[ -x "$(command -v xclip)" ]]; then
base64 kartoffel | xclip -sel clip
exit
fi
echo "err: can't figure out how to copy stuff to clipboard"
echo ""
echo "if you have a moment, please report it at:"
echo " https://github.com/patryk27/kartoffel"
echo ""
echo "... and provide a bit of information on your setup (what's your system, desktop manager etc.)"
exit 1
fi