[aur-general] postinstall script and local user directory

Jorge Barroso jorge.barroso.11 at gmail.com
Tue May 22 08:13:46 EDT 2012


2012/5/22 rafael ff1 <rafael.f.f1 at gmail.com>

> >Since your first post, I was not comfortable having a install script
> >looking for a normal user's home folder, because you can always find
> >yourself in the situation that a user might be added after LMD is
> >installed. (not being harsh, just not a good idea, IMO)
>
> >So, I came up with the idea of applying a patch in the 'ldm' script.
> >With this patch, 'lmd' would verify if the user have '~/.LMD'
> >everytime, right before starting the gtkdialog. See my diff:
>
>
> >--- src/usr/local/bin/lmd       2011-07-03 17:19:24.000000000 -0300
> >+++ pkg/usr/bin/lmd     2012-05-21 22:07:06.587084106 -0300
> >@@ -323,6 +323,7 @@
>
>   >if [ -z $1 ];
>   <then
> >+       [ ! -d ~/.LMD ] && lmd -reconf
> >       gtkdialog --program=MAIN_DIALOG
> > fi
> > echo $1
>
>
> >I added the following line the PKGBUILD, after installing lmd to
> '$pkgdir':
>
> > sed -e '325s#then#then\n\t[ ! -d ~/.LMD ] \&\& lmd -reconf#' -i
> >"${pkgdir}"/usr/bin/lmd
>
> >which just replace in line 325 the "then", adding one more line with
> >the command command you provided.
>
> >Hope it helps.
>
> Rafael
>

Mmm yes it helps, I know what you mean, adding a line on the own lmd binary
script that checks if .LMD already exists... any time you run lmd an for
any user ;) Not bad :D but... if fear I don't know so sed "command", so I
can't comprehend where are you exactly telling me that I should put that
or... well :S sorry, could you explain it a little more :S

My bigest thanks friend


More information about the aur-general mailing list