mirror of
https://github.com/harish2704/installer-scripts.git
synced 2026-09-10 06:11:08 +00:00
Update installer script
This commit is contained in:
+19
-12
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user