-
-
Notifications
You must be signed in to change notification settings - Fork 190
Expand file tree
/
Copy pathdistribute.sh
More file actions
executable file
·88 lines (77 loc) · 2.32 KB
/
distribute.sh
File metadata and controls
executable file
·88 lines (77 loc) · 2.32 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# This script builds a distributable AppImage
# of the term.everything application using Podman.
PODMAN="podman "
APP_NAME="term.everything❗mmulet.com-dont_forget_to_chmod_+x_this_file"
get_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
else
echo "unknown"
return
fi
# Check ID first, then fall back to ID_LIKE
for id in $ID $ID_LIKE; do
case $id in
ubuntu|debian|linuxmint|pop)
echo "sudo apt install -y"
return
;;
fedora)
echo "sudo dnf install -y"
return
;;
centos|rhel|rocky|almalinux)
echo "sudo yum install -y"
return
;;
arch|manjaro|cachyos|endeavouros|garuda)
echo "sudo pacman -S"
return
;;
opensuse*|suse)
echo "sudo zypper install"
return
;;
alpine)
echo "sudo apk add"
return
;;
void)
echo "sudo xbps-install -S"
return
;;
gentoo)
echo "sudo emerge"
return
;;
nixos)
echo "nix-env -iA nixpkgs."
return
;;
esac
done
echo "unknown"
}
if ! command -v podman >/dev/null 2>&1; then
if command -v docker >/dev/null 2>&1; then
PODMAN="docker "
else
INSTALL_CMD=$(get_distro)
echo "Warning: podman is not installed or not in PATH."
echo "To install on your system, try: $INSTALL_CMD podman"
echo "Please install podman to proceed, it's literally all you need. Don't even need attention. Just podman. Just get podman. What are you waiting for? Stop reading this and install podman."
exit 1
fi
fi
if [ -z "${PLATFORM+x}" ]; then
PLATFORM_ARG=""
else
PLATFORM_ARG="--platform $PLATFORM -e PLATFORM=$PLATFORM -e MULTI_PLATFORM=1 -e ARCH_PREFIX=$ARCH_PREFIX"
fi
$PODMAN run \
$PLATFORM_ARG \
-it \
--volume .:/home/mount \
--rm alpine:latest /bin/sh /home/mount/resources/alpineCompile.sh && \
echo "Output is ./dist/$PLATFORM/static/$APP_NAME"