forked from ChrisTitusTech/mybash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bf6eb2
commit db37eae
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh -e | ||
|
||
# Define variables for the repository URL and the installation directory | ||
FASTFETCH_REPO_URL="https://github.com/LinusDierheimer/fastfetch" | ||
INSTALL_DIR="$HOME/fastfetch" | ||
|
||
# Check if the installation directory exists, create it if it doesn't | ||
if [ ! -d "$INSTALL_DIR" ]; then | ||
echo "Cloning fastfetch repository into: $INSTALL_DIR" | ||
git clone "$FASTFETCH_REPO_URL" "$INSTALL_DIR" | ||
if [ $? -eq 0 ]; then | ||
echo "Successfully cloned fastfetch repository" | ||
else | ||
echo "Failed to clone fastfetch repository" | ||
exit 1 | ||
fi | ||
else | ||
echo "Repository already exists at: $INSTALL_DIR" | ||
fi | ||
|
||
# Navigate to the installation directory | ||
cd "$INSTALL_DIR" | ||
|
||
# Pull the latest changes from the repository | ||
git pull | ||
|
||
# Create a build directory and navigate into it | ||
mkdir -p build | ||
cd build | ||
|
||
# Run cmake and make to compile fastfetch | ||
cmake .. | ||
make -j$(nproc) | ||
|
||
# Install fastfetch | ||
sudo make install | ||
|
||
echo "fastfetch has been successfully installed" |