Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .devcontainer/postCreateScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ readonly ALIAS_SRC_URL="https://raw.githubusercontent.com/gvatsal60/Linux-Aliase
###################################################################################################
# Functions
###################################################################################################
curl_https() {
if ! command -v curl >/dev/null 2>&1; then
echo "Error: curl is not installed. Aborting." >&2
return 1
fi
curl -fsSL --proto '=https' "$@"
}

###################################################################################################
# Main Script
###################################################################################################

# Install Linux aliases from external script using curl and execute immediately
# Note: Make sure to review scripts fetched from external sources for security reasons
if command -v curl >/dev/null 2>&1; then
curl -fsSL "${ALIAS_SRC_URL}" | sh
else
echo "Error: curl is not installed. Unable to use Linux aliases"
exit 1
fi
curl_https "${ALIAS_SRC_URL}" | sh

# As bind mounts not supported in GitHub Codespaces
if [ -n "${CODESPACE_NAME}" ]; then
Expand Down