You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if I create a little fpm plugin (the example is GNU/Linux specific but does not have to be) called "fpm-tools"
#!/bin/bash#@(#) fpm-apps plugin for fpm on Ubuntu to install my fpm-tools repositoriesMESSAGE(){
cat <<\EOFA plugin for fpm. Give an fpm github repository name such as"urbanjost/prep" and it will be cloned, built, and installed. Examples: + urbanjost/prep - fortran preprocessor + urbanjost/f90split - split free-format Fortran file + urbanjost/compute - command-line calculator + urbanjost/flower - change case and or remove comments or code + urbanjost/numdiff - compare numeric differences in otherwise identical files + urbanjost/xpand - clean up tabs and whitespace in Fortran source + urbanjost/what - display file metadataEOF
}
if [ "$*"='' ]
then# launch browser searching for fortran sites with a topic of "fpm-tool"
xdg-open 'https://github.com/search?q=%22fpm-tools%22%20in:topic%20language:fortran'exitfi#trap "time" DEBUGforNAMEin$*do
SCRATCH=scr_$(uuidgen)trap"rm -rf -- '/tmp/${SCRATCH:-NOTTHERE}'" EXIT
mkdir -p /tmp/$SCRATCHcd /tmp/$SCRATCH||exit
git clone https://github.com/$NAME
BNAME=$(basename $NAME)cd$BNAME||exit
fpm install
$BNAME --help|less -r
#trap -pdoneexit
so the idea is I then enter "fpm tools" it launches my browser and shows github repositories with a primary language of fortran and something close to "fpm-tools" as a topic for the repository. If I give it a name of a tool (I put several out of varying usefulness to demonstrate the concept here) like "fpm tools urbanjost/prep" it would then clone, build, and install the program on my machine using just git(1) and fpm(1).
Does it seem useful to have an approach like this for fpm repositories in lieu of using other install tools? Does anyone know of a better way to organize the packages (maybe a web site with archive files for vetted packages?) . The github scheme avoids name collisions for the package names, but means potentially creating a lot of little github repositories, as it is not obvious how to create a hierarchical
setup in github with something like a repository name of tools but then subdirectories so you could have many programs in one repo.
Obviously needs to have options like directory to instll in, warn about overwriting an existing command, and so on but wondering if a simple approach like this has appeal and if we should decide on a topic name and such to reduce the number of bogus listing and so on, or if some other way of implementing something similiar is planned. fpm(1) can be used for applications as well as libraries and generally very simple.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So if I create a little fpm plugin (the example is GNU/Linux specific but does not have to be) called "fpm-tools"
so the idea is I then enter "fpm tools" it launches my browser and shows github repositories with a primary language of fortran and something close to "fpm-tools" as a topic for the repository. If I give it a name of a tool (I put several out of varying usefulness to demonstrate the concept here) like "fpm tools urbanjost/prep" it would then clone, build, and install the program on my machine using just git(1) and fpm(1).
Does it seem useful to have an approach like this for fpm repositories in lieu of using other install tools? Does anyone know of a better way to organize the packages (maybe a web site with archive files for vetted packages?) . The github scheme avoids name collisions for the package names, but means potentially creating a lot of little github repositories, as it is not obvious how to create a hierarchical
setup in github with something like a repository name of tools but then subdirectories so you could have many programs in one repo.
Obviously needs to have options like directory to instll in, warn about overwriting an existing command, and so on but wondering if a simple approach like this has appeal and if we should decide on a topic name and such to reduce the number of bogus listing and so on, or if some other way of implementing something similiar is planned. fpm(1) can be used for applications as well as libraries and generally very simple.
Beta Was this translation helpful? Give feedback.
All reactions