#!/usr/bin/env bash

# Target directory from argument
TARGET_DIR="$1"

# Check if argument is provided
if [ -z "$TARGET_DIR" ]; then
	echo "Usage: $0 <directory>"
	exit 1
fi

# Create the directory if it doesn't exist
mkdir -p "$TARGET_DIR"

# Change to the directory
cd "$TARGET_DIR" || {
	echo "Failed to enter directory $TARGET_DIR"
	exit 1
}
