Spaces:
Paused
Paused
Changed App Initiation
Browse files
init.sh
CHANGED
|
@@ -20,23 +20,25 @@ if [ -n "$GITHUB_PAT" ]; then
|
|
| 20 |
|
| 21 |
echo "π Latest Git Commit:"
|
| 22 |
git log -1 --pretty=format:"πΉ %h %s by %an on %ad" --date=short
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
else
|
| 24 |
echo "β
Repository already cloned at $TARGET_DIR"
|
| 25 |
fi
|
| 26 |
-
|
| 27 |
-
shopt -s dotglob # include hidden files like .env, .gitignore
|
| 28 |
-
mv "$TARGET_DIR"/* "$APP_DIR"/
|
| 29 |
-
rm -rf "$TARGET_DIR"
|
| 30 |
-
shopt -u dotglob
|
| 31 |
-
|
| 32 |
-
# Set permissions (optional)
|
| 33 |
-
echo "π§ Setting main folder permissions..."
|
| 34 |
-
chmod -R +x "$APP_DIR"
|
| 35 |
-
# chmod -R 777 "$APP_DIR/*"
|
| 36 |
-
ls -la "$APP_DIR"
|
| 37 |
-
echo "π§ Setting sessions permissions..."
|
| 38 |
-
chmod -R 777 "$APP_DIR/clients_sessions"
|
| 39 |
-
|
| 40 |
# Install Python dependencies
|
| 41 |
if [ -f "$APP_DIR/requirements.txt" ]; then
|
| 42 |
echo "π¦ Installing Python dependencies..."
|
|
|
|
| 20 |
|
| 21 |
echo "π Latest Git Commit:"
|
| 22 |
git log -1 --pretty=format:"πΉ %h %s by %an on %ad" --date=short
|
| 23 |
+
|
| 24 |
+
echo "π Moving contents from $TARGET_DIR to $APP_DIR..."
|
| 25 |
+
shopt -s dotglob # include hidden files like .env, .gitignore
|
| 26 |
+
mv "$TARGET_DIR"/* "$APP_DIR"/
|
| 27 |
+
rm -rf "$TARGET_DIR"
|
| 28 |
+
shopt -u dotglob
|
| 29 |
+
|
| 30 |
+
# Set permissions (optional)
|
| 31 |
+
echo "π§ Setting main folder permissions..."
|
| 32 |
+
chmod -R +x "$APP_DIR"
|
| 33 |
+
# chmod -R 777 "$APP_DIR/*"
|
| 34 |
+
ls -la "$APP_DIR"
|
| 35 |
+
echo "π§ Setting up sessions & permissions..."
|
| 36 |
+
mkdir "$APP_DIR/clients_sessions"
|
| 37 |
+
chmod -R 777 "$APP_DIR/clients_sessions"
|
| 38 |
else
|
| 39 |
echo "β
Repository already cloned at $TARGET_DIR"
|
| 40 |
fi
|
| 41 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
# Install Python dependencies
|
| 43 |
if [ -f "$APP_DIR/requirements.txt" ]; then
|
| 44 |
echo "π¦ Installing Python dependencies..."
|