init
This commit is contained in:
commit
82164a46ac
4 changed files with 43 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
builddir
|
||||||
25
main.cpp
Normal file
25
main.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
using namespace std::filesystem;
|
||||||
|
|
||||||
|
const path PACMAN_HOOKS = "/etc/pacman.d/hooks";
|
||||||
|
|
||||||
|
//
|
||||||
|
// main is where all program execution starts
|
||||||
|
//
|
||||||
|
//
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
if (!exists(PACMAN_HOOKS)) {
|
||||||
|
create_directory(PACMAN_HOOKS);
|
||||||
|
cout << "Directory created: " << PACMAN_HOOKS << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Hello there.\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
3
meson.build
Normal file
3
meson.build
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
project('dotty', 'cpp')
|
||||||
|
|
||||||
|
executable('dotty', 'main.cpp', dependencies: [])
|
||||||
14
mise.toml
Normal file
14
mise.toml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[tools]
|
||||||
|
meson = "1.8.2"
|
||||||
|
ninja = "1.13.0"
|
||||||
|
|
||||||
|
[tasks.setup]
|
||||||
|
run = "meson setup --reconfigure builddir"
|
||||||
|
|
||||||
|
[tasks.compile]
|
||||||
|
dir = "{{ cwd }}/builddir"
|
||||||
|
run = "meson compile"
|
||||||
|
|
||||||
|
[tasks.run]
|
||||||
|
dir = "{{ cwd }}/builddir"
|
||||||
|
run = "chmod +x dotty; sudo ./dotty"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue