Closed danimateo closed 4 years ago
Yeah I think an AUR package would be great!
I wanted to actually make one because it would be an easier way than managing all the dependencies but I've just never done it before. (I do use Arch btw :rofl: )
I would love some help with doing that.
I all the code in bin/cadmus
script has a global variable script_dir
, it then tries to call each other script relative to that directory, I did it that way because it made it more portable.
/usr/bin
and bin/cadmus
calls them from PATH
or is that not an issue?config.json
, the location of which is stored in the CONFIG_DIR
variable, cadmus
expects it to be located one directory up from it, would it be more appropriate to change this to ~/.config/cadmus/config.json
?
config.json
because:
.json
because jq
comes with Arch.Also for reference I did today write a quick installer in install.sh
which essentially clones the repo to .cadmus
, symlinks the binary to ~/.local/bin
and then prints out missing dependencies, but I think we should try and get something on AUR.
Some other notes on this.
I wrote cadmus find
and cadmus search
alongside cadmus
and so they represent generally what I think the code base should look like, everything else I wrote piecemeal over the last 18 months and I intend to clean it up in between classes.
I'm more than open to advice on how to restructure code because my area is Math/DataSci, not so much programming.
So I started working on a preliminary PKGBUILD here, it's still a WIP and I'm going to copy/paste some of the TODO notes I made in there for discussion sake, I'd love input.
# TODO hmm, the config file would probably have to go in ~/.config/cadmus/config.json for this to work well.
# TODO Need to fix file system permissions error
# TODO I need to have a centralised list of dependencies, currently they are listed in:
#
# 1. README
# 1. Install.sh
# 1. This MakePkg
# 1. up in the depends Array
# 1. here in the depArray warning
# TODO Should I be installing everything to ~/.cadmus or should I throw all the scripts into /usr/bin?
#
#
# PROS; the portability is convenient and motivates users to look at the scripts
# and investigate them
# PROS; the portability means I don't have to package for other distros
#
# CONS; maybe having the individual scripts in /usr/bin would be simpler to install
# CONS; maybe having the individual scripts in PATH would be better for users
#
}
how about a symlink in .cadmus to /usr/bin? I think it keeps all the pros and cons
Yeah I think that could work, the only other issues are:
rm -r ~/.cadmus
because pacman
put it thereSo does it even make sense to have everything in one folder?
Hopefully I'll get some time in a couple of days to play with it some more, but I'll need to have a think about config files like which I'll track in #11, @danimateo I'd love input on #11.
Yeah check #11 I think it answers this as well
The config has been moved to ~/.config, so now I just need to play around with the PKGBUILD and we'll be able throw it on AUR.
For the moment it'll all be contained in ~/.cadmus (but for the config) but perhaps as time goes on we can have two branches, portable and installed :shrug:
cadmus is available on the AUR !! :).
The config will run from ~/.config/cadmus/config.json
but the script should generate one and using read -e
means there is autocomplete.
@danimateo Can you try and install from AUR and tell me if it all works?
Actually a user just made a deletion request, I'm not sure why though, I've made a comment on the AUR, one of the reasons was is in no way helpful to the end user so that sucks.
So it seems that we overlooked the fact that packages cannot land in $HOME
, we'll have to modify this.
It appears that /usr/bin
is a flat directory so that's not gonna be a simply modification, but, it is in "$PATH
so it won't be too difficult to modify the code.
It's just now I'm going to have two branches, one for the makepkg and another for a portable package which is a PITA.
Hmmm, it seems that we could just use /opt/cadmus and we'd still be within the guidelines.
More over if I make a specific release I won't have to rename either.
Yeah the makepkg now builds to /opt
I like that because it makes it easier for a user to copy the whole directory out and modify it and change it and adopt it.
The source also targets a release so the deletion request should be rejected.
If is deleted I'm definitely not going to go through the effort though, given that my submission was met with hostility rather than enthusiasm it's not something I'm going to waste my time on.
Hey, nice repo you have here. What do you think about an AUR pkg? I can try and make it. Some other installers would also be nice.