fordon_greeman / pkger

Branch: 451f89f
Switch branches/tags
main
theidioticdev feat: support more than just git, guix pkg test, port bs from c to shell c2d1d35 18d ago
47 lines · 1.2 KB Raw Blame History
1 #ifndef REPOS_H
2 #define REPOS_H
3
4 typedef struct
5 {
6 const char *name;
7 const char *url;
8 const char *fetchCmd;
9 const char *fetchFmt;
10 const char *buildCmd;
11 const char *installCmd;
12 const char *uninstallCmd;
13 } Repository;
14
15
16 static const Repository REPOS[] =
17 {
18 /* add your repos here... */
19 {
20 .name = "sfetch",
21 .url = "https://codeberg.org/theidioticdev/sfetch",
22 .fetchCmd = "git clone",
23 /* command repo dir" */
24 .fetchFmt = "%s %s %s",
25 .buildCmd = "./build",
26 .installCmd = "./build --install",
27 .uninstallCmd = "./build --uninstall"},
28 {
29 .name = "lsa",
30 .url = "https://git.sr.ht/~trondelag__/lsa",
31 .fetchCmd = "git clone",
32 .fetchFmt = "%s %s %s",
33 .buildCmd = "cc -std=c89 lsa.c -o lsa",
34 .installCmd = "cp lsa /usr/local/bin/lsa",
35 .uninstallCmd = "rm lsa /usr/local/bin/lsa"},
36 {
37 .name = "guix",
38 .url = "https://guix.gnu.org/install.sh",
39 .fetchFmt = "%s %s -P %s",
40 .fetchCmd = "wget",
41 .buildCmd = "chmod +x install.sh",
42 .installCmd = "./install.sh",
43 .uninstallCmd = "./install.sh --uninstall"}
44 };
45
46 static const size_t REPO_COUNT = sizeof (REPOS) / sizeof (REPOS[0]);
47 #endif