Merge branch 'master' into alokify-patch-1

This commit is contained in:
Eshan Roy
2024-11-26 18:30:20 +05:30
committed by GitHub
3 changed files with 111 additions and 3 deletions

55
git-config.sh Executable file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# Author: Eshan Roy <m.eshanized@gmail.com>
# Description: This script configures GitHub user email and username.
set -e
# Function to display usage
usage() {
echo "Usage: ${0##*/} [--email <email>] [--username <username>] [-h]"
echo " --email <email> Set the GitHub user email."
echo " --username <username> Set the GitHub username."
echo " -h Display this help message."
exit 1
}
# Parse command line arguments
while [[ "$#" -gt 0 ]]; do
case "$1" in
--email)
EMAIL="$2"
shift 2
;;
--username)
USERNAME="$2"
shift 2
;;
-h|--help)
usage
;;
*)
echo "Unknown parameter passed: $1"
usage
;;
esac
done
# Prompt for email if not provided
if [ -z "$EMAIL" ]; then
read -p "Enter your GitHub email: " EMAIL
fi
# Prompt for username if not provided
if [ -z "$USERNAME" ]; then
read -p "Enter your GitHub username: " USERNAME
fi
# Set the Git configuration
git config --global user.email "$EMAIL"
git config --global user.name "$USERNAME"
# Confirmation message
echo "GitHub configuration updated:"
echo " User Email: $EMAIL"
echo " Username: $USERNAME"

View File

@@ -1,12 +1,10 @@
<h1 align="center">SNIGDHA OS</h1> <h1 align="center">SNIGDHA OS</h1>
<div aligna="center"> <div aligna="center">
<p align="center"> <p align="center">
<img height = 300px align="center" src="https://github.com/user-attachments/assets/be469594-e128-4789-97aa-412226c7b9f2"> <img height = 300px align="center" src="https://github.com/user-attachments/assets/be469594-e128-4789-97aa-412226c7b9f2">
</p> </p>
An Arch-based Linux distribution focused on performance, simplicity, and user empowerment. An Arch-based Linux distribution focused on performance, simplicity, and user empowerment.
[![License](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE) [![License](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE)

55
push.sh Executable file
View File

@@ -0,0 +1,55 @@
#!/bin/bash
# Author : ESHAN ROY
# Author URI : https://eshanized.github.io
# NOTE : RUN AT YOUR OWN RISK!
# Define the conventional commit types with emojis
TYPES=("🎉 feat" "🐞 fix" "📚 docs" "💅 style" "🔨 refactor" "⚡️ perf" "🧪 test" "🛠️ build" "🤖 ci" "🧹 chore" "⏪️ revert")
# Prompt the user to select a commit type
echo "Select a commit type:"
select type in "${TYPES[@]}"; do
break
done
# Extract the commit type and emoji from the selection
type_emoji=${type}
type=${type_emoji#* }
emoji=${type_emoji% *}
# Prompt the user to enter a scope (optional)
read -p "Enter a scope (optional): " scope
# Prompt the user to enter a short description
read -p "Enter a short description: " desc
# Prompt the user to enter a longer description (optional)
read -p "Enter a longer description (optional): " long_desc
# Create the commit message
commit_msg="$emoji $type($scope): $desc"
# If a longer description was provided, add it to the commit message
if [ -n "$long_desc" ]; then
commit_msg+="
$long_desc"
fi
# Print the commit message to the console
echo "Commit message:"
echo "$commit_msg"
# Pull form Github
git pull
# Stage all changes
git add .
# Commit the changes with the conventional commit message
git commit -m "$commit_msg"
# Push the changes to the remote repository
git push origin $(git rev-parse --abbrev-ref HEAD)