每次安裝linux下的包的時候都要乙個個config make make install安裝,煩,抽了個空,查了些資料,寫了個bash安裝指令碼,分別安裝了openldapujs、freeradiusujs及checkuserujs包,安裝時只需./install.sh即可,這三個包放在與install同乙個目錄下的work目錄夾裡。安裝的配置在jsradius.ebuild中。
install.sh
#!/usr/bin/env bash
conf="jsradius.ebuild"
if [ ! -e $conf ]
then
echo "can't find ujsradius.ebuild."
exit 1
fi
if [ $# -ne 1 ]
then
echo "only one parameter is permitted."
exit 1
fi
source $conf
export origdir=`pwd`
export workdir=$/work
export srcdir1=$/$
export srcdir2=$/$
export srcdir2=$/$
ebuild_unpack()
if [ -d $ ]
then
rm -rf $
fi
mkdir $
cd $
if [ ! -e $/$ ]
then
echo "$/$ does not exist. please download first."
exit 1
fi
tar xzf $/$
echo "unpacked $/$."
if [ ! -e $/$ ]
then
echo "$/$ does not exist. please download first."
exit 1
fi
tar xzf $/$
echo "unpacked $/$."
if [ ! -e $/$ ]
then
echo "$/$ does not exist. please download first."
exit 1
fi
tar xzf $/$
echo "unpacked $/$."
#source is now correctly unpacked }
ebuild_compile() " ]
then
echo "$ does not exist -- please unpack first."
exit 1
fi
#make sure we're in the right directory
cd $
user_compile_ldap
if [ ! -d "$" ]
then
echo "$ does not exist -- please unpack first."
exit 1
fi
#make sure we're in the right directory
cd $
user_compile_radius
if [ ! -d "$" ]
then
echo "$ does not exist -- please unpack first."
exit 1
fi
#make sure we're in the right directory
cd $
user_compile_checkuser }
case "$" in
unpack)
ebuild_unpack
;;
compile)
ebuild_compile
;;
install)
ebuild_install
;;
all)
ebuild_unpack
ebuild_compile
ebuild_install
;;
*)
echo "please specify unpack, compile, install or all as the parameter"
exit 1
;;
esac
jsradius.ebuild
#jsradius ebuild conf write by cz_hyf
makeopts="-j2"
p1=openldapujs-2.0.25
p2=freeradiusujs-0.8.1
p3=checkuserujs-1.0
a1=$.tar.gz
a2=$.tar.gz
a3=$.tar.gz
user_compile_ldap()
user_compile_radius()
user_compile_checkuser()
install
#!/usr/bin/env bash
conf="ujsradius.ebuild"
if [ ! -e $conf ]
then
echo "can't find ujsradius.ebuild."
exit 1
fi
if [ $# -ne 1 ]
then
echo "only one parameter is permitted."
exit 1
fi
source $conf
export origdir=`pwd`
export workdir=$/work
export srcdir1=$/$
export srcdir2=$/$
export srcdir2=$/$
ebuild_unpack()
if [ -d $ ]
then
rm -rf $
fi
mkdir $
cd $
if [ ! -e $/$ ]
then
echo "$/$ does not exist. please download first."
exit 1
fi
tar xzf $/$
echo "unpacked $/$."
if [ ! -e $/$ ]
then
echo "$/$ does not exist. please download first."
exit 1
fi
tar xzf $/$
echo "unpacked $/$."
if [ ! -e $/$ ]
then
echo "$/$ does not exist. please download first."
exit 1
fi
tar xzf $/$
echo "unpacked $/$."
#source is now correctly unpacked }
ebuild_compile() " ]
then
echo "$ does not exist -- please unpack first."
exit 1
fi
#make sure we're in the right directory
cd $
user_compile_ldap
if [ ! -d "$" ]
then
echo "$ does not exist -- please unpack first."
exit 1
fi
#make sure we're in the right directory
cd $
user_compile_radius
if [ ! -d "$" ]
then
echo "$ does not exist -- please unpack first."
exit 1
fi
#make sure we're in the right directory
cd $
user_compile_checkuser }
case "$" in
unpack)
ebuild_unpack
;;
compile)
ebuild_compile
;;
install)
ebuild_install
;;
all)
ebuild_unpack
ebuild_compile
ebuild_install
;;
*)
echo "please specify unpack, compile, install or all as the parameter"
exit 1
;;
esac
自己寫的乙個Vue
下面這裡是我自己寫的乙個小型的vue,原理就是proxy proxy天生沒有prototype,因此要加上,不然extends會報錯 proxy.prototype proxy.prototype object.prototype class myvue extends proxy super da...
自己寫乙個LIST
pragma once forward declarations templateclass clistnode templateclass clist template class clistnode void insertafter t data template void clistnode ...
自己寫乙個框架
自己寫乙個框架 單入口mvc 類 庫 屬於擴充套件 乙個好的配置檔案和讀取功能 db介面 dispather.php index.php dispather 分析controller action 根據分析controller action 動態載入 引入乙個自動載入機制 controller.ph...