initial commit
This commit is contained in:
commit
f6b0821ad5
0
Applications/Defold.sh
Normal file
0
Applications/Defold.sh
Normal file
0
Applications/VSCode.sh
Normal file
0
Applications/VSCode.sh
Normal file
23
REDME.md
Normal file
23
REDME.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# BashInstaller
|
||||||
|
Simple Bash application installer.
|
||||||
|
|
||||||
|
## Applications & Software
|
||||||
|
* Visual Studio Code (TO-DO)
|
||||||
|
* Node (TO-DO)
|
||||||
|
* Java (TO-DO)
|
||||||
|
* Android Studio (TO-DO)
|
||||||
|
* Discord (TO-DO)
|
||||||
|
* OBS (TO-DO)
|
||||||
|
* Defold (TO-DO)
|
||||||
|
* Spotify (TO-DO)
|
||||||
|
* Slack (TO-DO)
|
||||||
|
* ZSH (TO-DO)
|
||||||
|
* Docker (TO-DO)
|
||||||
|
* Xampp (TO-DO)
|
||||||
|
* Missing any applications or software? Feel free to leave an issue behind or create a merge request with the created files :)
|
||||||
|
|
||||||
|
## Create
|
||||||
|
Add file name to array in install.sh file
|
||||||
|
|
||||||
|
|
||||||
|
|
45
install.sh
Executable file
45
install.sh
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
myfunc() {
|
||||||
|
local myresult='some value'
|
||||||
|
echo $myresult
|
||||||
|
}
|
||||||
|
|
||||||
|
result="$(myfunc)"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
get_files() {
|
||||||
|
cd Applications
|
||||||
|
local -n arr=$1
|
||||||
|
local FILES=(one two)
|
||||||
|
|
||||||
|
for file in "$PWD"/*; do
|
||||||
|
if [[ $file == ./install.sh ]]; then
|
||||||
|
echo "das"
|
||||||
|
elif [[ $file == *.sh ]]; then
|
||||||
|
|
||||||
|
arr+=(${file##*/})
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ${FILES[@]}
|
||||||
|
}
|
||||||
|
# https://stackoverflow.com/questions/10582763/how-to-return-an-array-in-bash-without-using-globals
|
||||||
|
# get_files()
|
||||||
|
array=()
|
||||||
|
|
||||||
|
get_files array
|
||||||
|
# VAR+=("$(get_files)")
|
||||||
|
|
||||||
|
|
||||||
|
# echo "${VAR[-1]}"
|
||||||
|
|
||||||
|
for i in "${arr[@]}"; do
|
||||||
|
echo $i
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user