1 Star 3 Fork 1

王子锋/CentWSL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
yuk7 提交于 2020-02-06 23:26 . Makefile: fix cleanup
OUT_ZIP=CentOS8.zip
LNCR_EXE=CentOS8.exe
DLR=curl
DLR_FLAGS=-L
BASE_URL=http://cloud.centos.org/centos/8/x86_64/images/CentOS-8-Container-8.1.1911-20200113.3-layer.x86_64.tar.xz
LNCR_ZIP_URL=https://github.com/yuk7/wsldl/releases/download/20013100/icons.zip
LNCR_ZIP_EXE=CentOS.exe
all: $(OUT_ZIP)
zip: $(OUT_ZIP)
$(OUT_ZIP): ziproot
@echo -e '\e[1;31mBuilding $(OUT_ZIP)\e[m'
cd ziproot; zip ../$(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.gz...\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
echo "# This file was automatically generated by WSL. To stop automatic generation of this file, remove this line." | sudo tee rootfs/etc/resolv.conf
sudo chmod +x rootfs
base.tar.xz:
@echo -e '\e[1;31mDownloading base.tar.xz...\e[m'
$(DLR) $(DLR_FLAGS) $(BASE_URL) -o base.tar.xz
clean:
@echo -e '\e[1;31mCleaning files...\e[m'
-rm ${OUT_ZIP}
-rm -r ziproot
-rm Launcher.exe
-rm icons.zip
-rm rootfs.tar.gz
-sudo rm -r rootfs
-rm base.tar.xz
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gggbb/CentWSL.git
git@gitee.com:gggbb/CentWSL.git
gggbb
CentWSL
CentWSL
master

搜索帮助