Spaces:
Runtime error
Runtime error
Update upload.sh
Browse files
upload.sh
CHANGED
|
@@ -6,11 +6,14 @@ if [ -z "$sc4sc_token" ]; then
|
|
| 6 |
exit 1
|
| 7 |
fi
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
# 作業用一時ディレクトリ
|
| 10 |
WORK_DIR=$(mktemp -d)
|
| 11 |
echo "作業ディレクトリ: $WORK_DIR"
|
| 12 |
|
| 13 |
-
# Git 認証情報を含む URL
|
| 14 |
REPO_URL="https://user:[email protected]/spaces/sc4sc/editor"
|
| 15 |
|
| 16 |
# clone して main ブランチを取得
|
|
@@ -20,9 +23,6 @@ cd "$WORK_DIR" || exit 1
|
|
| 20 |
# 既存の内容を削除
|
| 21 |
find . -mindepth 1 -maxdepth 1 ! -name ".git" -exec rm -rf {} +
|
| 22 |
|
| 23 |
-
# スクリプト実行元(元のプロジェクト)のパス
|
| 24 |
-
SRC_DIR="."
|
| 25 |
-
|
| 26 |
# プロジェクト内容をコピー(.git, chromedriver を除く)
|
| 27 |
rsync -av --exclude='.git' --exclude='chromedriver' --exclude="$(basename "$WORK_DIR")" "$SRC_DIR"/ ./
|
| 28 |
|
|
|
|
| 6 |
exit 1
|
| 7 |
fi
|
| 8 |
|
| 9 |
+
# スクリプト実行元の絶対パス
|
| 10 |
+
SRC_DIR=$(pwd)
|
| 11 |
+
|
| 12 |
# 作業用一時ディレクトリ
|
| 13 |
WORK_DIR=$(mktemp -d)
|
| 14 |
echo "作業ディレクトリ: $WORK_DIR"
|
| 15 |
|
| 16 |
+
# Git 認証情報を含む URL
|
| 17 |
REPO_URL="https://user:[email protected]/spaces/sc4sc/editor"
|
| 18 |
|
| 19 |
# clone して main ブランチを取得
|
|
|
|
| 23 |
# 既存の内容を削除
|
| 24 |
find . -mindepth 1 -maxdepth 1 ! -name ".git" -exec rm -rf {} +
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
# プロジェクト内容をコピー(.git, chromedriver を除く)
|
| 27 |
rsync -av --exclude='.git' --exclude='chromedriver' --exclude="$(basename "$WORK_DIR")" "$SRC_DIR"/ ./
|
| 28 |
|