forked from yuk7/AlpineWSL
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (45 loc) · 1.44 KB
/
Makefile
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
OUT_ZIP=Devuan.zip
LNCR_EXE=Devuan.exe
DLR=curl
DLR_FLAGS=-L
BASE_URL=https://jenkins.linuxcontainers.org/view/Images/job/image-devuan/architecture=amd64,release=beowulf,variant=default/lastSuccessfulBuild/artifact/rootfs.tar.xz
LNCR_ZIP_URL=https://github.com/yuk7/wsldl/releases/download/23072600/icons.zip
LNCR_ZIP_EXE=Devuan.exe
all: $(OUT_ZIP)
zip: $(OUT_ZIP)
$(OUT_ZIP): ziproot
@echo -e '\e[1;31mBuilding $(OUT_ZIP)\e[m'
cd ziproot; bsdtar -a -cf ../$(OUT_ZIP) *
ziproot: Launcher.exe rootfs.tar.gz
@echo -e '\e[1;31mBuilding ziproot...\e[m'
mkdir ziproot
cp Launcher.exe ziproot/${LNCR_EXE}
cp rootfs.tar.gz ziproot/
exe: Launcher.exe
Launcher.exe: icons.zip
@echo -e '\e[1;31mExtracting Launcher.exe...\e[m'
unzip icons.zip $(LNCR_ZIP_EXE)
mv $(LNCR_ZIP_EXE) Launcher.exe
icons.zip:
@echo -e '\e[1;31mDownloading icons.zip...\e[m'
$(DLR) $(DLR_FLAGS) $(LNCR_ZIP_URL) -o icons.zip
rootfs.tar.gz: rootfs
@echo -e '\e[1;31mBuilding rootfs.tar.xz...\e[m'
cd rootfs; sudo tar -zcpf ../rootfs.tar.gz `sudo ls`
sudo chown `id -un` rootfs.tar.gz
rootfs: base.tar.xz
@echo -e '\e[1;31mBuilding rootfs...\e[m'
mkdir rootfs
sudo tar -xpf base.tar.xz -C rootfs
sudo chmod +x rootfs
base.tar.xz:
@echo -e '\e[1;31mDownloading base.tar.gz...\e[m'
$(DLR) $(DLR_FLAGS) $(BASE_URL) -o base.tar.xz
clean:
@echo -e '\e[1;31mCleaning files...\e[m'
-rm -r ziproot
-rm Launcher.exe
-rm icons.zip
-rm rootfs.tar.gz
-sudo rm -r rootfs
-rm base.tar.xz