169 |
fi |
fi |
170 |
|
|
171 |
# needed directory |
# needed directory |
172 |
install -d ${BINDIR}/etc/udev/rules.d || die |
install -d ${BINDIR}/lib/udev/rules.d || die |
173 |
|
|
174 |
# install our udev rule |
# install our udev rule |
175 |
install -v -m 0644 -o root -g root ${file} ${BINDIR}/etc/udev/rules.d/${udevrule} || die |
install -v -m 0644 -o root -g root ${file} ${BINDIR}/lib/udev/rules.d/${udevrule} || die |
176 |
} |
} |
177 |
|
|
178 |
minstalludevhelper() |
minstalludevhelper() |
636 |
# recursive |
# recursive |
637 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
638 |
then |
then |
639 |
opts="--recursive" |
opts="-R" |
640 |
source="$2" |
source="$2" |
641 |
dest="$3" |
dest="$3" |
642 |
fi |
fi |
644 |
# recursive |
# recursive |
645 |
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
646 |
then |
then |
647 |
opts="--recursive --force" |
opts="-R -f" |
648 |
source="$2" |
source="$2" |
649 |
dest="$3" |
dest="$3" |
650 |
fi |
fi |
651 |
|
|
652 |
if [[ $1 = -a ]] |
if [[ $1 = -a ]] |
653 |
then |
then |
654 |
opts="--archive" |
opts="-a" |
655 |
source="$2" |
source="$2" |
656 |
dest="$3" |
dest="$3" |
657 |
fi |
fi |
662 |
cp -v ${opts} ${source} ${BINDIR}/${dest} || die |
cp -v ${opts} ${source} ${BINDIR}/${dest} || die |
663 |
} |
} |
664 |
|
|
665 |
|
mdelete() |
666 |
|
{ |
667 |
|
local dest="$1" |
668 |
|
local opts |
669 |
|
|
670 |
|
# recursive |
671 |
|
if [[ $1 = -r ]] || [[ $1 = -R ]] |
672 |
|
then |
673 |
|
opts="-r" |
674 |
|
dest="$2" |
675 |
|
fi |
676 |
|
|
677 |
|
# recursive |
678 |
|
if [[ $1 = -rf ]] || [[ $1 = -fr ]] || [[ $1 = -Rf ]] || [[ $1 = -fR ]] |
679 |
|
then |
680 |
|
opts="-r -f" |
681 |
|
dest="$2" |
682 |
|
fi |
683 |
|
|
684 |
|
[[ -z ${dest} ]] && die "No dest given." |
685 |
|
[[ ! -e ${BINDIR}/${dest} ]] && die "${BINDIR}/${dest} does not exist." |
686 |
|
|
687 |
|
rm -v ${opts} ${BINDIR}/${dest} || die |
688 |
|
} |
689 |
|
|
690 |
mmove() |
mmove() |
691 |
{ |
{ |
692 |
local source="$1" |
local source="$1" |
696 |
# force |
# force |
697 |
if [[ $1 = -f ]] |
if [[ $1 = -f ]] |
698 |
then |
then |
699 |
opts="--force" |
opts="-f" |
700 |
source="$2" |
source="$2" |
701 |
dest="$3" |
dest="$3" |
702 |
fi |
fi |
742 |
# recursive |
# recursive |
743 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
744 |
then |
then |
745 |
local recursive="--recursive" |
local recursive="-R" |
746 |
local owner="$2" |
local owner="$2" |
747 |
local path="$3" |
local path="$3" |
748 |
fi |
fi |
762 |
# recursive |
# recursive |
763 |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
if [[ $1 = -r ]] || [[ $1 = -R ]] |
764 |
then |
then |
765 |
local recursive="--recursive" |
local recursive="-R" |
766 |
local posix="$2" |
local posix="$2" |
767 |
local path="$3" |
local path="$3" |
768 |
fi |
fi |