Watch 1 Star 1 Fork 0

码云极速下载 / wsluShellGPL-3.0

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/wslutilities/wslu
wslu,这是一套适用于 Windows 10 Linux 子系统的实用程序集,可以在 Windows 10 Linux 子系统下完成诸如将 Windows 路径转换为 WSL 专 spread retract

https://www.oschina.net/p/wslu

Clone or download
Makefile 2.10 KB
Copy Edit Web IDE Raw Blame History
请叫我PK authored 2020-05-10 01:04 . Makefile: remove wslgsu
AUTOMAKE_OPTIONS = foreign
DESTDIR ?=
PREFIX ?= /usr
HEADER = src/wslu-header
OUTPATH = out
MANPATH = docs
OUTMANPATH = out-docs
CURPATH = $(shell pwd)
SOURCES := $(wildcard src/*.sh)
ETCFILES := $(wildcard src/etc/*)
OUTFILES := $(wildcard out/*)
MANFILES := $(wildcard docs/*)
INSTEDEXES := $(wildcard $(DESTDIR)$(PREFIX)/bin/wsl*)
INSTEDMANOS := $(wildcard $(DESTDIR)$(PREFIX)/share/man/man1/wsl*)
DATETMP = $(shell date +%Y-%m-%d)
VERTMP = $(shell cat ./VERSION)
all: doc
[ -d $(OUTPATH) ] || mkdir $(OUTPATH)
sed -e s/VERSIONPLACEHOLDER/"$(VERTMP)"/g $(HEADER) > $(HEADER).tmp; \
for file in $(SOURCES); do \
cat $(HEADER).tmp $$file > $(OUTPATH)/`basename $$file`; \
mv $(OUTPATH)/`basename $$file` $(OUTPATH)/`basename $$file .sh`; \
done
rm $(HEADER).tmp
chmod +x $(OUTPATH)/*
install: doc_install res_install
install -Dm 755 out/* -t $(DESTDIR)$(PREFIX)/bin
uninstall:
for f in $(INSTEDEXES); do \
rm -f $$f; \
done
for f in $(INSTEDMANOS); do \
rm -f $$f; \
done
rm -rf $(DESTDIR)$(PREFIX)/share/man/man7/wslu.7.gz
rm -rf $(DESTDIR)$(PREFIX)/share/wslu
doc:
[ -d $(OUTMANPATH) ] || mkdir $(OUTMANPATH)
for file in $(MANFILES); do \
cp $$file $(OUTMANPATH); \
sed -e 's/DATEPLACEHOLDER/'$(DATETMP)'/' -e 's/VERSIONPLACEHOLDER/'$(VERTMP)'/' $(OUTMANPATH)/`basename $$file` > $(OUTMANPATH)/`basename $$file`.tmp; \
mv $(OUTMANPATH)/`basename $$file`.tmp $(OUTMANPATH)/`basename $$file`; \
gzip -f -q $(OUTMANPATH)/`basename $$file`; \
done
doc_install:
install -Dm 644 out-docs/*.1.gz -t $(DESTDIR)$(PREFIX)/share/man/man1
install -Dm 644 out-docs/*.7.gz -t $(DESTDIR)$(PREFIX)/share/man/man7
res_install:
install -Dm 644 src/etc/*.vbs -t $(DESTDIR)$(PREFIX)/share/wslu
install -Dm 644 src/etc/*.ps1 -t $(DESTDIR)$(PREFIX)/share/wslu
install -Dm 644 src/etc/*.ico -t $(DESTDIR)$(PREFIX)/share/wslu
install -Dm 755 src/etc/*.sh -t $(DESTDIR)$(PREFIX)/share/wslu
clean:
rm -rf $(OUTPATH)
rm -rf $(OUTMANPATH)
test:
extras/bats/libexec/bats tests/header.bats tests/wslsys.bats tests/wslusc.bats tests/wslupath.bats tests/wslvar.bats tests/wslfetch.bats tests/wslview.bats tests/wslact.bats

Comment ( 0 )

Sign in for post a comment

Shell
1
https://gitee.com/mirrors/wslu.git
git@gitee.com:mirrors/wslu.git
mirrors
wslu
wslu
master

Search