Skip to content

Commit

Permalink
Merge pull request #2 from sanhphanvan96/develop
Browse files Browse the repository at this point in the history
Fix nix package and script
  • Loading branch information
sanhphanvan96 authored Dec 8, 2023
2 parents b6329bd + 85465ed commit 8cd5b11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions bin/lolcommit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash


# Function to print help message
print_help() {
echo "Usage: lolcommit.sh [OPTIONS]"
Expand All @@ -12,27 +11,28 @@ print_help() {
echo " -s SEARCH Search for a keyword in all themes and generate a random commit from the results"
}

script_dir=$(dirname "$0")
# Get the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Function to list themes
list_themes() {
echo "Available themes:"
for file in "$script_dir/themes/*.txt"; do
for file in "$SCRIPT_DIR/../themes"/*.txt; do
# basename "$file" .txt
echo "$file"
done
}

# Function to concatenate all themes
concat_themes() {
for file in "$script_dir/themes/*.txt"; do
for file in "$SCRIPT_DIR/../themes"/*.txt; do
cat "$file"
done
}

# Function to search themes
search_themes() {
for file in "$script_dir/themes/*.txt"; do
for file in "$SCRIPT_DIR/../themes"/*.txt; do
grep -i "$1" "$file"
done
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
}:
stdenv.mkDerivation {
pname = "lolcommit";
version = "1.0.0";
version = "v1.0.1";
src = fetchFromGitHub {
owner = "sanhphanvan96";
repo = "lolcommit";
rev = "v1.0.0";
sha256 = "kiENQHeDqCbujERdxl+Rdzy2WUtvq6Jl7HqvH7zhNlc=";
rev = "v1.0.1";
sha256 = "sha256-5jAkLv7fpeNVHOW1cFwGCV573JkypxInwZs/zu4co+A=";
};
buildInputs = [ bash subversion ];
nativeBuildInputs = [ makeWrapper ];
Expand Down

0 comments on commit 8cd5b11

Please sign in to comment.