From b00103155ad7e23df0496e23973f7f193f50e4da Mon Sep 17 00:00:00 2001 From: Notoric Date: Sun, 9 Jun 2024 19:48:57 +0100 Subject: [PATCH] initial commit --- init.ps1 | 16 ++++++++++++++++ init.sh | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 init.ps1 create mode 100644 init.sh diff --git a/init.ps1 b/init.ps1 new file mode 100644 index 0000000..fc2c825 --- /dev/null +++ b/init.ps1 @@ -0,0 +1,16 @@ +# Get the current directory name +$current_dir = Split-Path -Path (Get-Location) -Leaf + +# Create README.md file +New-Item -Path "$current_dir\README.md" -ItemType File + +# Initialize git repository +git init +git remote add all "https://github.com/Notoric/$current_dir.git" +git remote set-url --add --push all "https://github.com/Notoric/$current_dir.git" +git remote set-url --add --push all "https://gitea.notoricloud.net/Notoric/$current_dir.git" +git add . +git branch -M main +git commit -m "initial commit" +git push origin main +git push gitea main diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..ce73eef --- /dev/null +++ b/init.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Define the name of the repo as the current directory name +current_dir=$(basename "${PWD}") + +# Create a readme file +touch README.md + +# Initialize git repository +git init +git remote add all https://github.com/Notoric/$REPO.git +git remote set-url --add --push all https://github.com/Notoric/$REPO.git +git remote set-url --add --push all https://gitea.notoricloud.net/Notoric/$REPO.git +git add . +git branch -M main +git commit -m "initial commit" +git push all main \ No newline at end of file