Created
May 11, 2024 10:07
-
-
Save aldoborrero/ff3995de46cbb1c67e229e029cc47821 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to ensure a dir exists | |
ensure_directory_exists() { | |
local dir="${1}" | |
if [ ! -d "${dir}" ]; then | |
mkdir -p "${dir}" | |
fi | |
} | |
# Function to use nix flakes if exists | |
use_flake_if_nix_installed() { | |
if command -v nix >/dev/null 2>&1; then | |
# Nix is installed, proceed to use flake | |
use flake | |
else | |
echo "Nix is not installed, skipping flake configuration." | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment