Skip to content

Fixing build script and making it effiecent #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: Master
Choose a base branch
from
98 changes: 57 additions & 41 deletions cosmic-epoch/build.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
#!/bin/bash

cd cosmic-applet-host
paru -Ui
cd ../
cd cosmic-applets
paru -Ui
cd ../
cd cosmic-applibrary
paru -Ui
cd ../
cd cosmic-bg
paru -Ui
cd ../
cd cosmic-comp
paru -Ui
cd ../
cd cosmic-launcher
paru -Ui
cd ../
cd cosmic-osd
paru -Ui
cd ../
cd cosmic-panel
paru -Ui
cd ../
cd cosmic-workspaces-epoch
paru -Ui
cd ../
cd cosmic-session
paru -Ui
cd ../
#cd iced-workspaces-applet
#paru -Ui
#cd ../
#cd user-color-editor
#paru -Ui
#cd ../
cd cosmic-settings-daemon
paru -Ui
cd ../
cd xdg-desktop-portal-cosmic
paru -Ui
# Ensure the script is not run as root
if [ "$(id -u)" -eq 0 ]; then
echo "Error: This script should not be run as root or with sudo."
exit 1
fi

# Get the number of CPU cores for maximum parallelism
num_jobs=$(nproc)

# Export environment variables
export MOLD_JOBS=1

# Set the Cargo target directory to a location in the user's home directory
export CARGO_TARGET_DIR="$HOME/cargo-target"

# Ensure the target directory exists
mkdir -p "$CARGO_TARGET_DIR"

# List of AUR packages to install
packages=(
"cosmic-applets-git"
"cosmic-applibrary-git"
"cosmic-bg-git"
"cosmic-comp-git"
#"cosmic-epoch-meta-git"
"cosmic-files-git"
"cosmic-launcher-git"
"cosmic-notifications-git"
"cosmic-osd-git"
"cosmic-panel-git"
#"cosmic-player-git"
"cosmic-randr-git"
#"cosmic-reader-git"
"cosmic-screenshot-git"
"cosmic-settings-git"
"cosmic-settings-daemon-git"
"cosmic-store-git"
"cosmic-term-git"
"cosmic-edit-git"
"cosmic-workspaces-epoch-git"
"xdg-desktop-portal-cosmic-git"
"cosmic-greeter-git"
#"cosmic-session-git"
)
git lfs install
# Install AUR packages
for pkg in "${packages[@]}"; do
echo "Installing $pkg..."
cd "$pkg"
paru -Ui --noconfirm
cd ..
done

echo "Finishing install..."
paru -S cosmic-session-git

echo "Done."