mirror of
https://github.com/harish2704/installer-scripts.git
synced 2026-09-10 06:11:08 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
installTmp="$HOME/.local/installTmp";
|
||||
appDir="$HOME/.local/Apps";
|
||||
localBinDir="$HOME/.local/bin";
|
||||
|
||||
checkPaths() {
|
||||
for i in $installTmp $appDir $localBinDir; do
|
||||
if [ ! -d "$i" ]; then
|
||||
mkdir -p "$i";
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
performDownloads(){
|
||||
cd "$installTmp";
|
||||
downloadPack;
|
||||
}
|
||||
|
||||
doInstall(){
|
||||
|
||||
for i in $extractedName $installationPath; do
|
||||
if [ -d "$i" ]; then
|
||||
rm -rf "$i"
|
||||
fi
|
||||
done
|
||||
installPack;
|
||||
cd "$installTmp";
|
||||
mv "$extractedName" "$installationPath";
|
||||
}
|
||||
|
||||
mainInstaller(){
|
||||
checkPaths;
|
||||
performDownloads;
|
||||
doInstall;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
. $(dirname $(readlink -f $0))/installer_common;
|
||||
export extractedName='node-v0.12.7-linux-x64';
|
||||
export installationPath="$appDir/$extractedName";
|
||||
|
||||
downloadPack(){
|
||||
wget -c 'https://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x64.tar.gz';
|
||||
}
|
||||
|
||||
installPack(){
|
||||
tar -xzvf 'node-v0.12.7-linux-x64.tar.gz';
|
||||
cd "$extractedName";
|
||||
find ./bin -type f -or -type l -executable > 'binaries.lst';
|
||||
}
|
||||
|
||||
|
||||
mainInstaller;
|
||||
Reference in New Issue
Block a user