Browse Source

Refactor

master
Harish.K 10 years ago
parent
commit
a8cd3dd705
  1. 13
      bin/installer.sh
  2. 14
      lib/installer_common
  3. 4
      packages/nodejs
  4. 6
      packages/self

13
bin/installer.sh

@ -9,13 +9,24 @@ EEE
exit 1;
fi
. $(dirname $(readlink -f $0))/../lib/installer_common;
appRoot=$(readlink -f $(dirname $(readlink -f $0))/.. );
. "$appRoot/lib/installer_common";
printPackages(){
cd $appDir/installer-scripts/packages;
ls;
}
updateSelf(){
$0 --install self;
}
installPackage(){
packageName=$2;
. "$appRoot/packages/$packageName";
mainInstaller;
}
case $1 in
--update)
updateSelf;

14
lib/installer_common

@ -29,13 +29,6 @@ doInstall(){
mv "$appName" "$installationPath";
}
mainInstaller(){
checkPaths;
performDownloads;
doInstall;
updateBinLinks;
}
updateBinLinks(){
cd $localBinDir;
for i in $(find "$appDir" -name 'binaries.lst'); do
@ -45,4 +38,9 @@ updateBinLinks(){
done;
}
mainInstaller(){
checkPaths;
performDownloads;
doInstall;
updateBinLinks;
}

4
packages/nodejs

@ -1,6 +1,3 @@
#!/usr/bin/env bash
. $(dirname $(readlink -f $0))/installer_common;
export appName='node-v0.12.7-linux-x64';
export installationPath="$appDir/$appName";
@ -15,4 +12,3 @@ installPack(){
}
mainInstaller;

6
packages/self

@ -1,10 +1,8 @@
#!/usr/bin/env bash
export appName='installer-scripts';
export installationPath="$appDir/$appName";
downloadPack(){
wget -c 'https://github.com/harish2704/installer-scripts/archive/master.zip';
wget 'https://github.com/harish2704/installer-scripts/archive/master.zip';
}
installPack(){
@ -15,5 +13,3 @@ installPack(){
touch 'binaries.lst';
}
mainInstaller;

Loading…
Cancel
Save