summaryrefslogtreecommitdiff
path: root/auto/functions/appimage-hook
blob: 1c8887383866eef16ad52f935b8eff48b0e6c540 (plain)
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
#!/bin/sh

current_script="$(basename "$0"|sed 's/^lb_//')"

if [ "$current_script" = "chroot_hooks" ]; then
	echo "HOOK: appimage@chroot_hooks"
	if [ -e config/chroot_appimage ]; then
		mkdir -p chroot/run/live/medium
		cp -rf config/chroot_appimage/* chroot/run/live/medium/
	fi
fi

if [ "$current_script" = "binary_rootfs" ]; then
	echo "HOOK: appimage@binary-rootfs"

	if [ -e chroot/var/lib/dpkg/info/libc6:amd64.postinst ]; then
	echo "DEBUG amd64"
		if [ -e /tmp/chroot_appimage ]; then
		echo "DEBUG: appimages folder found"

		# figure out arch TODO

				echo "DEBUG: appimage amd64"
				mkdir -p binary/appimages
				cp -f /tmp/chroot_appimage/* binary/appimages/
				chmod ugo+x binary/appimages/*
		fi
	fi
fi