make the program installable

This commit is contained in:
2026-01-22 21:17:24 -07:00
parent ef80b03029
commit 6a20f179af
4 changed files with 37 additions and 13 deletions

18
Makefile Normal file
View File

@@ -0,0 +1,18 @@
support_files := ${XDG_DATA_HOME}/bill-generator/
config_files:= ${XDG_CONFIG_HOME}/bill-generator/
install_loc := ~/.local/bin/
install:
mkdir -p $(support_files)
mkdir -p $(config_files)
mkdir -p $(install_loc)
cp *.mm $(support_files)
# Copy the ident file but don't overwrite one that is already there.
cp --update=none ident $(config_files)
cp gen.sh $(install_loc)/bill-gen
printf "\nInstalled!\nUpdate your identity at $(config_files)ident\n\n"
remove:
# Remove everything except the config files
rm -r $(support_files)
rm $(install_loc)bill-gen