Skip to content

Commit

Permalink
💥 Remove clone shell function
Browse files Browse the repository at this point in the history
Remove `clone` shell function as it is almost never used.
  • Loading branch information
alrra committed Mar 6, 2024
1 parent fbf7c73 commit c3a63f2
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/shell/bash_functions
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,6 @@

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Clone a repository and install its dependencies.

clone() {

git clone "$1" \
|| return

cd "$(basename "${1%.*}")" \
|| return

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Check if there are dependencies to be installed.

if [ ! -f "package.json" ]; then
return
fi

# Check if the project uses Yarn.

if [ -f "yarn.lock" ] && command -v "yarn" $> /dev/null; then
printf "\n"
yarn install
return
fi

# If not, assume it uses npm.

if command -v "npm" $> /dev/null; then
printf "\n"
npm install
fi

}

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Create data URI from a file.

datauri() {
Expand Down

0 comments on commit c3a63f2

Please sign in to comment.