diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2025-09-09 01:03:00 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2025-09-09 01:03:00 +0800 |
| commit | 0f60ae10a7eeef4ff03496eac6f4d2cca6373a02 (patch) | |
| tree | 5dbb904f4886652396da69f1c1ad262e99a4c7db /repos/extra/ports/git | |
| parent | 0e3651e7a8f4c160121e2fb1a06d05ab43895c67 (diff) | |
| download | alicelinux-0f60ae10a7eeef4ff03496eac6f4d2cca6373a02.tar.gz alicelinux-0f60ae10a7eeef4ff03496eac6f4d2cca6373a02.zip | |
archived
Diffstat (limited to 'repos/extra/ports/git')
| -rw-r--r-- | repos/extra/ports/git | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/repos/extra/ports/git b/repos/extra/ports/git deleted file mode 100644 index 654a8c77..00000000 --- a/repos/extra/ports/git +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# /etc/ports/drivers/git: git driver script for ports(8) -# - -if [ $# -ne 1 ]; then - echo "usage: $0 <file>" >&2 - exit 1 -fi - -. $1 - -if [ -z "$URL" ]; then - echo "URL not set in '$1'" >&2 - exit 2 -fi -if [ -z "$NAME" ]; then - echo "NAME not set in '$1'" >&2 - exit 2 -fi -if [ -z "$BRANCH" ]; then - echo "BRANCH not set in '$1'" >&2 - exit 2 -fi - -REPOSITORY="$PORTS_DIR/$NAME" -if [ -n "$LOCAL_REPOSITORY" ]; then - REPOSITORY="$LOCAL_REPOSITORY" -fi - -echo "Fetching updates from $URL" -echo "Updating collection $NAME" - -cd "$REPOSITORY" 2> "/dev/null" - -if [ $? -lt 1 ]; then - git checkout -q "$BRANCH" - git fetch -q - git diff --pretty=format: --name-status "$BRANCH" origin/"$BRANCH" | sed "s/M\t/ Edit /g; s/A\t/ Checkout /g; s/D\t/ Delete /g" | sort - git clean -q -f - git reset -q --hard origin/"$BRANCH" -else - git clone -q -b "$BRANCH" "$URL" "$REPOSITORY" - ls -1 $REPOSITORY | sed "s/^/ Checkout /" -fi - -echo "Finished successfully" |