commit f6b0821ad54af5d4cc39a79e17b0a25fd46160e2 Author: spekulaas Date: Tue Jun 22 00:47:23 2021 +0200 initial commit diff --git a/Applications/Defold.sh b/Applications/Defold.sh new file mode 100644 index 0000000..e69de29 diff --git a/Applications/VSCode.sh b/Applications/VSCode.sh new file mode 100644 index 0000000..e69de29 diff --git a/REDME.md b/REDME.md new file mode 100644 index 0000000..bebe04b --- /dev/null +++ b/REDME.md @@ -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 + + + \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..092c06a --- /dev/null +++ b/install.sh @@ -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 \ No newline at end of file