commit e5559fc74f2d0d868011db89f0bd36f30ae1257e Author: eshanized Date: Fri Jan 3 07:33:45 2025 +0530 chore: initiate extra repo diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..90da770 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 SNIGDHA OS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package-list.sh b/package-list.sh new file mode 100755 index 0000000..a9d381e --- /dev/null +++ b/package-list.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +#----------------------------------------------------------- +# Script to generate a list of package details from a GitHub repository URL +# Author: RiO +# Date: 2024-12-27 +# Description: This script fetches the list of package filenames +# from a specified GitHub repository and processes them into a clean output. +# It also removes duplicate package names. +#----------------------------------------------------------- + +# GitHub API URL for the directory +repo_url="https://api.github.com/repos/Snigdha-OS/snigdhaos-core/contents/x86_64" + +# Output file +output_file="packages.txt" + +# Function to install curl if not installed (for Arch Linux) +install_curl() { + echo "curl is not installed. Attempting to install..." + + # Check if the system is using the pacman package manager (Arch Linux) + if command -v pacman &> /dev/null; then + sudo pacman -Sy --noconfirm curl + else + echo "Error: Could not detect pacman package manager. Please install curl manually." + exit 1 + fi + + # Verify if curl was successfully installed + if command -v curl &> /dev/null; then + echo "curl has been installed successfully." + else + echo "Error: Failed to install curl. Please install it manually." + exit 1 + fi +} + +# Function to fetch and process the package list (only package names, with duplicates removed) +fetch_packages() { + # Check if curl is installed + if ! command -v curl &> /dev/null; then + install_curl + fi + + # Fetch the directory content from the GitHub API, extract package names, remove duplicates + curl -s "$repo_url" | \ + jq -r '.[].name' | \ + grep -oP '^[^/]+(?=-[0-9]+-[a-z0-9]+\.pkg\.tar\.zst)' | \ + sort | \ + uniq > "$output_file" + + # Check if the output file is generated successfully + if [[ $? -eq 0 ]]; then + echo "Generated $output_file with package names (duplicates removed)." + else + echo "Error: Failed to generate the package list." + exit 1 + fi +} + +# Run the function +fetch_packages \ No newline at end of file diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..cf80693 --- /dev/null +++ b/push.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# Author : ESHAN ROY +# Author URI : https://eshanized.github.io + +# Define the conventional commit types with new emojis +TYPES=("๐Ÿš€ feat" "๐Ÿ› fix" "๐Ÿ“ docs" "โœจ style" "๐Ÿ›  refactor" "โšก๏ธ perf" "๐Ÿ”ฌ test" "๐Ÿ”ง build" "๐Ÿค– ci" "๐Ÿงน chore" "โช revert") + +# 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 + +# Extract the commit type and emoji from the selection +type_emoji=${type} +type=${type_emoji#* } +emoji=${type_emoji% *} + +# 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: $desc" + +# If a longer description was provided, add it to the commit message +if [ -n "$long_desc" ]; then + commit_msg+="\n\n$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 diff --git a/repo-creds.sh b/repo-creds.sh new file mode 100644 index 0000000..bcf3e0b --- /dev/null +++ b/repo-creds.sh @@ -0,0 +1,4 @@ +pacman-key --recv-key 93BC54415EA8E7AB --keyserver keyserver.ubuntu.com +pacman-key --lsign-key 93BC54415EA8E7AB +pacman -U '#' +pacman -U '@' diff --git a/x86_64/aic94xx-firmware-30-10-any.pkg.tar.zst b/x86_64/aic94xx-firmware-30-10-any.pkg.tar.zst new file mode 100644 index 0000000..f5f270e Binary files /dev/null and b/x86_64/aic94xx-firmware-30-10-any.pkg.tar.zst differ diff --git a/x86_64/aic94xx-firmware-30-10-any.pkg.tar.zst.sig b/x86_64/aic94xx-firmware-30-10-any.pkg.tar.zst.sig new file mode 100644 index 0000000..55dfc61 Binary files /dev/null and b/x86_64/aic94xx-firmware-30-10-any.pkg.tar.zst.sig differ diff --git a/x86_64/repo-updater.sh b/x86_64/repo-updater.sh new file mode 100755 index 0000000..8a90a47 --- /dev/null +++ b/x86_64/repo-updater.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +#----------------------------------------------------------- +# Script to update Snigdha OS Core repository +# Author : Eshan Roy +# Author URI : https://eshanized.github.io +# Contributor : RiO +# Contributor URI : https://d3v1l0n.github.io +# Date : 2024-12-27 +# Description : This script updates the Snigdha OS Core repository +# by adding new package files and updating the database files. +#----------------------------------------------------------- + +# Set the name for the repository database +repo_name="snigdhaos-core" + +# Function to handle errors +handle_error() { + echo "Error: $1" + exit 1 +} + +# Step 1: Remove old packages and database files +echo "Cleaning up old package and database files..." +rm -f "${repo_name}"* || handle_error "Failed to remove old packages." + +# Step 2: Adding new packages to the repository +echo "Adding new packages to the repository..." +repo-add -s -n -R "${repo_name}.db.tar.gz" *.pkg.tar.zst || handle_error "Failed to add packages." + +# Sleep to ensure all files are processed +sleep 1 + +# Step 3: Remove old database and files +echo "Cleaning up old database and files..." +rm -f "${repo_name}.db" "${repo_name}.db.sig" "${repo_name}.files" "${repo_name}.files.sig" || handle_error "Failed to remove old database files." + +# Step 4: Move new files into place +echo "Moving new database and file archive..." +mv -f "${repo_name}.db.tar.gz" "${repo_name}.db" || handle_error "Failed to move database file." +mv -f "${repo_name}.db.tar.gz.sig" "${repo_name}.db.sig" || handle_error "Failed to move database signature file." +mv -f "${repo_name}.files.tar.gz" "${repo_name}.files" || handle_error "Failed to move files archive." +mv -f "${repo_name}.files.tar.gz.sig" "${repo_name}.files.sig" || handle_error "Failed to move files signature." + +# Step 5: Confirmation +echo "Repository updated successfully!" +echo "*******************************************************************************" +echo "You can now sync the repository with 'pacman -Sy' to fetch the latest packages." +echo "*******************************************************************************" \ No newline at end of file diff --git a/x86_64/snigdhaos-core.db b/x86_64/snigdhaos-core.db new file mode 100644 index 0000000..92a8470 Binary files /dev/null and b/x86_64/snigdhaos-core.db differ diff --git a/x86_64/snigdhaos-core.db.sig b/x86_64/snigdhaos-core.db.sig new file mode 100644 index 0000000..eb1a509 Binary files /dev/null and b/x86_64/snigdhaos-core.db.sig differ diff --git a/x86_64/snigdhaos-core.files b/x86_64/snigdhaos-core.files new file mode 100644 index 0000000..7e1c6e1 Binary files /dev/null and b/x86_64/snigdhaos-core.files differ diff --git a/x86_64/snigdhaos-core.files.sig b/x86_64/snigdhaos-core.files.sig new file mode 100644 index 0000000..4de12c9 Binary files /dev/null and b/x86_64/snigdhaos-core.files.sig differ