Closed iacobus42 closed 7 years ago
Thanks for all this work @iacobus42 !
I will review this PR in detail this evening, but it all looks good with a quick glance.
I added testing with travis to cover OS X but the OS X jobs don't seem to be starting on Travis. The OS X testing environment seems very (very) slow to start. Build 114 passed both - Build 115 (currently running) is the same as Build 114 but with an updated README.md
covering the OS X-specific dependences.
I've had trouble in the past with the OS X builds on Travis. I'm okay with merging it without that working and I can play around with it later.
I just pushed your requested edits. The OS X travis tests are passing but it takes about 15-20 minutes for the OS X jobs to even start.
Thanks!
I made a few changes to soji to enable it to run on OS X. They are
--date
flag withdate
. This is a GNU extension todate
. To enable it to work on OS X and other non-GNU *nix systems, the flags needed to be changed.date --date
is easily replaced bydate -jf
. See the answer by Dirk Eddelbuettel and comments at http://stackoverflow.com/questions/1842634/parse-date-in-bash for more detailsdate
requires the-v
flag to add time to the present dateawk
in OS X would issue a warning when-F ''
was used. To suppress this warning, I changed it to use-FS=,
.soji
andsoji.scm
to point to the guile at/usr/local/bin
and not/usr/bin
.(More on this later) OS X won't let you install to/usr/bin
even with sudo unless you disable some OS protection features so it is often just easier to install to/usr/local/bin
and deal with it./usr/bin
. In the Makefile I changed the install location for soji to/usr/local/bin/soji
from/usr/bin/soji
/usr/local/bin
unless I provided the full path.notify-send
doesn't work on OS X as far as I can tell. I used the terminal-notifier project by julienXX (https://github.com/julienXX/terminal-notifier) to provide for OS notifications based on the cron jobs in OS XI used the
uname
to determine if the system is on OS X or not and run the correct code accordingly (OS X if theuname -a
containsDarwin
). It only uses the OS X specific code when on OS X, otherwise it runs the original soji code.Since OS X and Ubuntu have different shebangs and paths required, I wrote a version of the files
soji
,soji.scm
andMakefile
with the appended OS (for_linux
orfor_os_x
). I then wrote a very simple script to usemv
the system specific files to the generic names (e.g., on OS X,soji_for_os_x
becomessoji
) and then runmake install
. A user should be able to install soji on either Ubuntu or OS X by just runningsudo sh install_soji
.I have tested the repo on Ubuntu and OS X El Capitan.