chore: make bash script more portable (#5679)

This commit is contained in:
Zack 2024-07-03 15:26:28 +08:00 committed by GitHub
parent e21ad18453
commit 55f06cb7a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "Generating flowy icon files"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Store the current working directory
original_dir=$(pwd)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Store the current working directory
original_dir=$(pwd)

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo "Generating language files"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
gdbus call --session --dest io.appflowy.AppFlowy \
--object-path /io/appflowy/AppFlowy/Object \
--method io.appflowy.AppFlowy.Open "['$1']" {}

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
YELLOW="\e[93m"
GREEN="\e[32m"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
YELLOW="\e[93m"
GREEN="\e[32m"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
YELLOW="\e[93m"
GREEN="\e[32m"
@ -90,4 +90,4 @@ cargo install --force duckscript_cli
# Check prerequisites
printMessage "Checking prerequisites."
cargo make appflowy-flutter-deps-tools
cargo make appflowy-flutter-deps-tools

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
YELLOW="\e[93m"
GREEN="\e[32m"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
VERSION=$1

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -e /usr/bin/AppFlowy ]; then
echo "Symlink already exists, skipping."
else

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -e /usr/bin/AppFlowy ]; then
rm /usr/bin/AppFlowy
rm /usr/bin/AppFlowyLauncher.sh

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
LINUX_RELEASE_PRODUCTION=$1
VERSION=$2

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
gdbus call --session --dest io.appflowy.AppFlowy \
--object-path /io/appflowy/AppFlowy/Object \
--method io.appflowy.AppFlowy.Open "['$1']" {}

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -e /usr/local/bin/AppFlowy ]; then
echo "Symlink already exists, skipping."
else

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ -e /usr/local/bin/appflowy ]; then
rm /usr/local/bin/appflowy
fi
fi

View File

@ -2,7 +2,7 @@
script_runner = "bash"
script = [
"""
#!/bin/bash
#!/usr/bin/env bash
BASE_DIR=$(pwd)
crates=("lib-dispatch" "flowy-encrypt" "lib-infra" "flowy-notification" "flowy-date" "flowy-error" "collab-integrate" "flowy-document")
@ -56,4 +56,4 @@ script = ["""
end
end
"""]
script_runner = "@duckscript"
script_runner = "@duckscript"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Ensure a new revision ID is provided
if [ "$#" -ne 1 ]; then

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Paths to your Cargo.toml files
REPO_PATH="./AppFlowy-Collab"
@ -38,4 +38,4 @@ fi
# Switch dependencies in both Cargo.toml files
switch_deps "$CARGO_TOML_1" "$REPO_RELATIVE_PATH_1"
switch_deps "$CARGO_TOML_2" "$REPO_RELATIVE_PATH_2"
switch_deps "$CARGO_TOML_2" "$REPO_RELATIVE_PATH_2"