Skip to content

Commit

Permalink
添加自动切换到脚本所在目录
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Nov 20, 2023
1 parent ac3b858 commit 12253ab
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 11 deletions.
4 changes: 3 additions & 1 deletion config/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion eureka/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion gateway/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion modules/core/core/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion modules/core/files/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion modules/test1/test1/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion modules/test2/test2/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion modules/test3/test3/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion nacos/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -32,4 +34,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion sentinel/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
4 changes: 3 additions & 1 deletion zipkin/src/main/webapp/WEB-INF/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo ""
echo "[信息] 运行Web工程。"
echo ""

cd "$(cd "$(dirname "$0")"; pwd)"

# 设置JDK目录
# JAVA_HOME="$PWD/jdk1.8.0_x64"

Expand All @@ -30,4 +32,4 @@ else
RUN_JAVA="$JAVA_HOME"/bin/java
fi

exec $RUN_JAVA -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher
exec "$RUN_JAVA" -cp $CLASS_PATH $JAVA_OPTS org.springframework.boot.loader.WarLauncher

0 comments on commit 12253ab

Please sign in to comment.