#! /bin/bash
#CMD='apt-get -y install %s';
CMD='echo %s';
REGEXP='(#.*|^\s*$)'
function installPackage(){
PERFORM_CMD=`printf "${CMD}" $1`;
echo ${PERFORM_CMD};
${PERFORM_CMD};
}
function installPackages(){
while read line
do
if [[ $line =~ $REGEXP ]]; then
continue;
fi
installPackage $line;
done <$1 } # for PACKAGE_LIST in installfiles.txt; do installPackages ${PACKAGE_LIST}; done
Sunday, 10 June 2012
Simple script to install some packages for my server
Labels:
installation,
server,
tool