forked from clan/clan-core
Merge pull request 'docs: Fix installer wrong indentation' (#1516) from Qubasa/clan-core:Qubasa-main into main
This commit is contained in:
commit
5794cdf8fa
@ -54,9 +54,9 @@ sudo umount /dev/sdb1
|
|||||||
flash-installer
|
flash-installer
|
||||||
```
|
```
|
||||||
|
|
||||||
The `--ssh-pubkey`, `--language` and `--keymap` are optional.
|
The `--ssh-pubkey`, `--language` and `--keymap` are optional.
|
||||||
Replace `$HOME/.ssh/id_ed25519.pub` with a path to your SSH public key.
|
Replace `$HOME/.ssh/id_ed25519.pub` with a path to your SSH public key.
|
||||||
If you do not have an ssh key yet, you can generate one with `ssh-keygen -t ed25519` command.
|
If you do not have an ssh key yet, you can generate one with `ssh-keygen -t ed25519` command.
|
||||||
|
|
||||||
!!! Danger "Specifying the wrong device can lead to unrecoverable data loss."
|
!!! Danger "Specifying the wrong device can lead to unrecoverable data loss."
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
coreutils,
|
coreutils,
|
||||||
git,
|
git,
|
||||||
tea,
|
tea,
|
||||||
gawk,
|
|
||||||
openssh,
|
openssh,
|
||||||
}:
|
}:
|
||||||
writeShellApplication {
|
writeShellApplication {
|
||||||
@ -15,7 +14,6 @@ writeShellApplication {
|
|||||||
git
|
git
|
||||||
tea
|
tea
|
||||||
openssh
|
openssh
|
||||||
gawk
|
|
||||||
];
|
];
|
||||||
text = builtins.readFile ./script.sh;
|
text = builtins.readFile ./script.sh;
|
||||||
}
|
}
|
||||||
|
@ -4,13 +4,15 @@ set -euo pipefail
|
|||||||
remoteFork="${1:-origin}"
|
remoteFork="${1:-origin}"
|
||||||
remoteUpstream="${2:-upstream}"
|
remoteUpstream="${2:-upstream}"
|
||||||
targetBranch="${3:-main}"
|
targetBranch="${3:-main}"
|
||||||
shift && shift
|
shift && shift && shift
|
||||||
TMPDIR="$(mktemp -d)"
|
TMPDIR="$(mktemp -d)"
|
||||||
currentBranch="$(git rev-parse --abbrev-ref HEAD)"
|
currentBranch="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
user="$(git config --get remote.origin.url | awk -F'[@:/]' '{print $3}' | tr -d '\n')"
|
user_unparsed="$(tea whoami)"
|
||||||
|
user="$(echo "$user_unparsed" | tr -d '\n' | cut -f4 -d' ')"
|
||||||
tempRemoteBranch="$user-$currentBranch"
|
tempRemoteBranch="$user-$currentBranch"
|
||||||
root_dir=$(git rev-parse --show-toplevel)
|
root_dir=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
|
||||||
# Function to check if a remote exists
|
# Function to check if a remote exists
|
||||||
check_remote() {
|
check_remote() {
|
||||||
if git remote get-url "$1" > /dev/null 2>&1; then
|
if git remote get-url "$1" > /dev/null 2>&1; then
|
||||||
@ -29,6 +31,7 @@ if ! check_remote "$remoteUpstream"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
upstream_url=$(git remote get-url "$remoteUpstream")
|
upstream_url=$(git remote get-url "$remoteUpstream")
|
||||||
|
git fetch "$remoteUpstream"
|
||||||
repo=$(echo "$upstream_url" | sed -E 's#.*:([^/]+/[^.]+)\.git#\1#')
|
repo=$(echo "$upstream_url" | sed -E 's#.*:([^/]+/[^.]+)\.git#\1#')
|
||||||
|
|
||||||
treefmt -C "$root_dir"
|
treefmt -C "$root_dir"
|
||||||
@ -48,6 +51,7 @@ fi
|
|||||||
|
|
||||||
git push --force -u "$remoteFork" HEAD:refs/heads/"$tempRemoteBranch"
|
git push --force -u "$remoteFork" HEAD:refs/heads/"$tempRemoteBranch"
|
||||||
|
|
||||||
|
set -x
|
||||||
tea pr create \
|
tea pr create \
|
||||||
--repo "$repo" \
|
--repo "$repo" \
|
||||||
--head "$user:$tempRemoteBranch" \
|
--head "$user:$tempRemoteBranch" \
|
||||||
|
Loading…
Reference in New Issue
Block a user