Update installer script

This commit is contained in:
2015-07-12 18:48:11 +05:30
parent 3e4fedcb0d
commit fd10ee1963
+19 -12
View File
@@ -19,36 +19,43 @@ performDownloads(){
doInstall(){ doInstall(){
for i in $extractedName $installationPath; do for i in $appName $installationPath; do
if [ -d "$i" ]; then if [ -d "$i" ]; then
rm -rf "$i" rm -rf "$i"
fi fi
done done
installPack; installPack;
cd "$installTmp"; cd "$installTmp";
mv "$extractedName" "$installationPath"; mv "$appName" "$installationPath";
}
updateBinLinks(){
cd $localBinDir;
for i in $(find "$appDir" -name 'binaries.lst'); do
for f in $(cat $i);do
ln -s $(dirname $i)/$f ./;
done;
done;
} }
mainInstaller(){ mainInstaller(){
checkPaths; checkPaths;
performDownloads; performDownloads;
doInstall; doInstall;
updateBinLinks;
} }
export appName='installer-scripts';
export installationPath="$appDir/$appName";
export extractedName='installer-scripts-master';
export installationPath="$appDir/$extractedName";
downloadPack(){ downloadPack(){
wget -c 'https://github.com/harish2704/installer-scripts/archive/master.zip'; wget 'https://github.com/harish2704/installer-scripts/archive/master.zip' -O "${appName}.zip";
} }
installPack(){ installPack(){
unzip 'master.zip' unzip "${appName}.zip"
cd "$extractedName"; mv 'installer-scripts-master' "$appName";
# find ./ -type f -or -type l -executable > 'binaries.lst'; cd "$appName";
touch 'binaries.lst'; find ./bin -type f -or -type l -executable > 'binaries.lst';
} }
mainInstaller; mainInstaller;