Skip to content

Commit 69eb589

Browse files
committed
Improvements
1 parent b2efaa8 commit 69eb589

8 files changed

Lines changed: 128 additions & 151 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# rad
2-
glaucus package manager
2+
glaucus package builder
33

44
## Community
55
- [Discord](https://discord.gg/nDKNmNc)

rad.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version = "0.1.0"
22
author = "Firas Khana <firasuke@glaucuslinux.org>"
3-
description = "glaucus package manager"
3+
description = "glaucus package builder"
44
license = "MPL-2.0"
55

66
skipFiles = @["LICENSE", "README.md"]

src/arch.nim

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/bootstrap.nim

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# License, v. 2.0. If a copy of the MPL was not distributed with this
77
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
88

9-
import std/os, constants
9+
import std/[os, strformat, strutils], constants, tools
1010

1111
proc cleanBootstrap*() =
1212
const dirs = ["../cross", "../log", "../tmp", "../toolchain"]
@@ -26,6 +26,18 @@ proc prepareCross*() =
2626
removeDir(dir)
2727
createDir(dir)
2828

29+
proc require*() =
30+
const exes = [
31+
"autoconf", "automake", "autopoint", "awk", "bash", "booster", "bzip2", "curl",
32+
"diff", "find", "gcc", "git", "grep", "gzip", "ld.bfd", "lex", "libtool", "limine",
33+
"m4", "make", "meson", "mkfs.erofs", "mkfs.fat", "ninja", "patch", "perl",
34+
"pkg-config", "sed", "tar", "xz", "yacc", "zstd",
35+
]
36+
37+
for i in exes:
38+
if findExe(i).isEmptyOrWhitespace():
39+
abort(&"""{127:8}{&"\{i\} not found":48}""")
40+
2941
proc setEnvBootstrap*() =
3042
const env = [
3143
("REPO", "../core"),

src/flags.nim

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/options.nim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# License, v. 2.0. If a copy of the MPL was not distributed with this
77
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
88

9-
import std/[os, parseopt, strutils], arch, bootstrap, packages, constants, tools
9+
import std/[os, parseopt, strutils], bootstrap, packages, constants, tools
1010

1111
proc options*() =
1212
const
@@ -74,7 +74,6 @@ Copyright © 2018-2025 Firas Khana"""
7474
echo helpBootstrap
7575
of "1", "stage1", "toolchain":
7676
require()
77-
setEnvArch()
7877
setEnvBootstrap()
7978
cleanBootstrap()
8079
prepareBootstrap()
@@ -85,7 +84,6 @@ Copyright © 2018-2025 Firas Khana"""
8584
echo ""
8685
echo "stage 1 (toolchain) complete"
8786
of "2", "stage2", "cross":
88-
setEnvArch()
8987
setEnvBootstrap()
9088
setEnvCross()
9189
prepareCross()
@@ -96,7 +94,6 @@ Copyright © 2018-2025 Firas Khana"""
9694
echo ""
9795
echo "stage 2 (cross) complete"
9896
of "3", "stage3", "native":
99-
setEnvArch()
10097
setEnvNative()
10198

10299
let stage3 = parsePackage("native").run.split()
@@ -107,7 +104,6 @@ Copyright © 2018-2025 Firas Khana"""
107104
else:
108105
exit(helpBootstrap, QuitFailure)
109106
of "build":
110-
setEnvArch()
111107
setEnvNative()
112108
cleanPackages()
113109

0 commit comments

Comments
 (0)