From a3b3648e0466a1cf26cd549e7bee106dd72dc6dc Mon Sep 17 00:00:00 2001 From: Eshan Roy Date: Sat, 14 Dec 2024 02:14:05 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(=5Fmassive):=20upgrade=20v2?= =?UTF-8?q?.1=20&&=20detailed=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++- push.sh | 102 +++++++++++++++++++++++++++++++++----------- 2 files changed, 200 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 88caa2e..6f6c24d 100644 --- a/README.md +++ b/README.md @@ -1 +1,122 @@ -# snigdhaos-calamares-config \ No newline at end of file + +# ๐Ÿ› ๏ธ Snigdha OS Calamares Configuration + +This repository contains the **Calamares Configuration** files tailored for **Snigdha OS**, enabling a seamless and user-friendly installation experience. Calamares is a powerful, adaptable, and customizable installer framework widely used in Linux distributions. + +

+ Snigdha OS Logo +

+ +
+ MIT License + Calamares Version +
+ +--- + +## ๐Ÿ“œ Overview + +This configuration is specifically optimized for the **Snigdha OS Arctic V** release, ensuring: +- **Simplified Installation Process** with an intuitive UI. +- **Support for Custom Partitioning** to suit diverse user needs. +- **Preloaded Setup Scripts** for environment initialization and optimization. +- **Snigdha OS Branding** for a cohesive and professional look. + +--- + +## ๐Ÿ“ Repository Structure + +```plaintext +. +โ”œโ”€โ”€ branding/ +โ”‚ โ”œโ”€โ”€ logo.png # Snigdha OS branding assets +โ”‚ โ”œโ”€โ”€ stylesheet.qss # Custom styles for the installer UI +โ”‚ โ””โ”€โ”€ translations/ # Language translations for installer +โ”œโ”€โ”€ modules/ +โ”‚ โ”œโ”€โ”€ partition.conf # Partitioning configuration +โ”‚ โ”œโ”€โ”€ locale.conf # Localization and language settings +โ”‚ โ”œโ”€โ”€ users.conf # User setup configurations +โ”‚ โ””โ”€โ”€ shellprocess/ # Custom post-install scripts +โ”œโ”€โ”€ settings.conf # Main configuration file for Calamares +โ””โ”€โ”€ README.md # Documentation +``` + +--- + +## โš™๏ธ Features + +- **๐Ÿ–ผ๏ธ Custom Branding**: The installer features Snigdha OS logos, colors, and themes for a unified experience. +- **๐ŸŒ Localization Support**: Multilingual installer with pre-configured translations. +- **๐Ÿ“ฆ Package Installation**: Automated installation of essential packages. +- **๐Ÿ”’ Secure Defaults**: Implements secure partitioning and configuration options by default. +- **๐Ÿ› ๏ธ Post-Install Scripts**: Runs post-installation scripts to finalize the setup, applying system optimizations and branding. + +--- + +## ๐Ÿ› ๏ธ How to Use + +### Prerequisites: +- Ensure **Calamares** is installed on the target system. +- Clone this repository: + ```bash + git clone https://github.com/Snigdha-OS/snigdhaos-calamares-config.git + ``` +- Install dependencies for Calamares: + ```bash + sudo pacman -S calamares qt5-base + ``` + +### Steps: +1. **Configure Calamares:** + Copy the contents of this repository to your Calamares configuration directory: + ```bash + sudo cp -r snigdhaos-calamares-config/* /etc/calamares/ + ``` +2. **Edit Settings:** + Modify the `settings.conf` file to reflect your installation preferences if needed. +3. **Run Calamares Installer:** + Launch Calamares with the custom configuration: + ```bash + sudo calamares + ``` + +--- + +## ๐Ÿ“ฆ Development + +### Customizing Branding: +- Update the **branding/logo.png** and **stylesheet.qss** files to adjust the UI. +- Add additional translations under the `branding/translations/` folder. + +### Adding Modules: +- New modules can be added to the `modules/` directory. Refer to the [Calamares Documentation](https://calamares.io/docs/modules/) for more details. + +--- + +## ๐Ÿ›ก๏ธ License + +This project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for more details. + +--- + +## ๐Ÿ‘จโ€๐Ÿ’ป Contributors + +| Contributor | Role | Contact | +|-------------------|---------------------------|----------------------------------------------------------------------------------------------| +| **@eshanized** | Lead Developer | [GitHub](https://github.com/eshanized) | +| **@alokified** | Web Infrastructure | [GitHub](https://github.com/alokified) | +| **@utkrshift** | UI/UX Designer | [GitHub](https://github.com/utkrshift) | + +--- + +## ๐ŸŒŸ Acknowledgments + +Special thanks to the **Snigdha OS Team** and our sponsors **Tonmoy Infrastructure** and **IXH International Co.** for their support in creating a modern and efficient Linux experience. + +--- + +## ๐Ÿ”— Useful Links + +- [Snigdha OS Official Website](https://snigdhaos.org) +- [Calamares Documentation](https://calamares.io/docs/) +- [Snigdha OS Arctic Repository](https://github.com/Snigdha-OS/snigdhaos-arctic) diff --git a/push.sh b/push.sh index 60508a5..09746d7 100755 --- a/push.sh +++ b/push.sh @@ -1,32 +1,86 @@ #!/bin/bash -# Author : Eshan Roy -# URI : https://eshanized.github.io +# Author : ESHAN ROY +# Author URI : https://eshanized.github.io -# NOTE: If you are on Snigdha OS, -# you can install commitizen-go with `sudo pacman -S commitizen-go` -# or `s commitizen-go`. Else you need to install `yay` or `yay-bin` -# to install commitizen. I have written this script only for *Arch Linux. +# Define the conventional commit types with new emojis +TYPES=("๐Ÿš€ feat" "๐Ÿ› fix" "๐Ÿ“ docs" "โœจ style" "๐Ÿ›  refactor" "โšก๏ธ perf" "๐Ÿ”ฌ test" "๐Ÿ”ง build" "๐Ÿค– ci" "๐Ÿงน chore" "โช revert") -# Function to check if Commitizen is installed -check_commitizen() { - if ! pacman -Qq commitizen-go &> /dev/null; then - echo "Commitizen is not installed. Please install it using 'yay -S commitizen-go'." >&2 - exit 1 +# Function to display an error and exit and +error_exit() { + echo -e "\033[1;31m[ERROR]\033[0m $1" + exit 1 +} + +# Ensure the script is run in a Git repository +git rev-parse --is-inside-work-tree > /dev/null 2>&1 || error_exit "This is not a Git repository." + +# Get the current branch name +branch=$(git rev-parse --abbrev-ref HEAD) + +# Pull the latest changes from the remote repository +echo "Pulling latest changes from remote branch '$branch'..." +git pull origin "$branch" || error_exit "Failed to pull changes from the remote repository. Please resolve any conflicts manually." + +# Prompt the user to select a commit type +echo "Select a commit type:" +select type in "${TYPES[@]}"; do + if [[ -n "$type" ]]; then + break + else + echo "Invalid selection. Please try again." fi -} +done -# Function to stage, commit, and push changes -push_to_github() { - git add . - git cz - git push origin master -} +# Extract the commit type and emoji from the selection +type_emoji=${type} +type=${type_emoji#* } +emoji=${type_emoji% *} -# Main Function -main() { - check_commitizen - push_to_github -} +# Prompt the user to enter a scope (optional) +read -p "Enter a scope (optional): " scope +scope_part="" +if [ -n "$scope" ]; then + scope_part="($scope)" +fi -main \ No newline at end of file +# Prompt the user to enter a short description +read -p "Enter a short description: " desc +if [ -z "$desc" ]; then + error_exit "A short description is required!" +fi + +# 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_part: $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 -e "\nCommit message:" +echo -e "\033[1;36m$commit_msg\033[0m" + +# Stage all changes +git add . + +# Commit the changes with the conventional commit message +if git commit -m "$commit_msg"; then + echo -e "\033[1;32mCommit successful!\033[0m" +else + error_exit "Commit failed." +fi + +# Push the changes to the remote repository +echo "Pushing changes to remote branch '$branch'..." +if git push origin "$branch"; then + echo -e "\033[1;32mChanges pushed to remote branch '$branch'.\033[0m" +else + error_exit "Push failed. Please check your connection or branch permissions." +fi \ No newline at end of file