#!/bin/bash # Input flags LANG="" APP_NAME="" # The directory path must be relative to where the script lives DIR="" # Example script usage # ./reset-next.sh --lang=en --appname=my-cool-app --dir=this-test # Loop through arguments and process them for arg in "$@" do case $arg in -l=*|--lang=*) LANG="${arg#*=}" shift ;; -a=*|--appname=*) APP_NAME="${arg#*=}" shift ;; -d=*|--dir=*) DIR="${arg#*=}" shift ;; esac done change_dir () { echo "✨ Changing directory to $1" cd $1 } delete_vercel_svg () { echo "❌ Deleting vercel.svg" rm public/vercel.svg } delete_home_css () { echo "❌ Deleting Home.module.css" rm styles/Home.module.css } add_custom_document () { echo "✅ Adding custom _document.js with lang=$LANG" cd pages echo 'import Document, { Html, Head, Main, NextScript } from "next/document"; class MyDocument extends Document { static async getInitialProps(ctx) { const initialProps = await Document.getInitialProps(ctx); return { ...initialProps }; } render() { return (