You are not logged in.

#1 2008-10-10 15:22:30

creslin
Member
Registered: 2008-10-04
Posts: 241

[solved] What does this do in .install files? op=$1; shift; $op $*

I see a lot of packages with .install files that have code like this.  What does it do exactly, and when is it needed?  TIA.

op=$1
shift
$op $*
op=$1
shift
[ "$(type -t "$op")" = "function" ] && $op "$@"

Last edited by creslin (2008-10-10 15:39:30)


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#2 2008-10-10 15:27:58

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,384
Website

Re: [solved] What does this do in .install files? op=$1; shift; $op $*

There are relics from a time when install files needed them.  Now, they are not needed in the install file.

Offline

#3 2008-10-10 15:37:51

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: [solved] What does this do in .install files? op=$1; shift; $op $*

Ah thanks


ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

Board footer

Powered by FluxBB