-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.hl
More file actions
141 lines (118 loc) · 3.18 KB
/
Copy pathbuild.hl
File metadata and controls
141 lines (118 loc) · 3.18 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/usr/bin/hl
using <gen 2>
# <main/colors>
% INSTALL_DIR: str = /usr/local/bin
% CARGO: str = cargo
;; ── Helper ────────────────────────────────────────────────
: info def
::cyan ▶ @msg
done
: ok def
::green ✓ @msg
done
;; ── Targets ───────────────────────────────────────────────
: normal def
-- info
\~> Building GhostFS Normal (release)...
> @CARGO build --release --features normal,zstd,lz4
-- ok
\~> Binary: target/release/ghostfs
done
: cybersec def
-- info
\~> Building GhostFS Cybersec (release)...
> @CARGO build --no-default-features --release --features cybersec,zstd,lz4
-- ok
\~> Binary: target/release/ghostfs [CYBERSEC MODE]
done
: normal-debug def
> @CARGO build --features normal,zstd,lz4
done
: cybersec-debug def
> @CARGO build --no-default-features --features cybersec,zstd,lz4
done
: test def
-- info
\~> Testing Normal mode...
> @CARGO test --features normal,zstd,lz4
-- info
\~> Testing Cybersec mode...
> @CARGO test --no-default-features --features cybersec,zstd,lz4
done
: install def
-- normal
^> install -m 755 target/release/ghostfs @INSTALL_DIR/ghostfs
-- ok
\~> Installed to @INSTALL_DIR/ghostfs
done
: install-cybersec def
-- cybersec
^> install -m 755 target/release/ghostfs @INSTALL_DIR/ghostfs-cybersec
-- ok
\~> Installed to @INSTALL_DIR/ghostfs-cybersec
done
: fmt def
> @CARGO fmt --all
done
: check def
> @CARGO check --features normal,zstd,lz4
> @CARGO check --no-default-features --features cybersec,zstd,lz4
> @CARGO clippy --features normal,zstd,lz4 -- -D warnings
done
: clean def
> @CARGO clean
done
: all def
-- normal
done
: help def
\~> GhostFS Makefile (Hacker Lang)
\~>
\~> Available targets:
\~> normal — build Normal mode (release)
\~> cybersec — build Cybersec mode (release)
\~> normal-debug — build Normal mode (debug)
\~> cybersec-debug — build Cybersec mode (debug)
\~> test — run tests for both modes
\~> install — install Normal to /usr/local/bin
\~> install-cybersec — install Cybersec version
\~> fmt — cargo fmt --all
\~> check — cargo check + clippy
\~> clean — cargo clean
\~> all — same as normal
\~> help — this message
done
;; ── Dispatcher ────────────────────────────────────────────
% target: str = all
? @argc > 0
% target = @arg0
done
? switch @target
| normal
-- normal
| cybersec
-- cybersec
| normal-debug
-- normal-debug
| cybersec-debug
-- cybersec-debug
| test
-- test
| install
-- install
| install-cybersec
-- install-cybersec
| fmt
-- fmt
| check
-- check
| clean
-- clean
| all
-- all
| help
-- help
| *
::red Unknown target: @target
-- help
done