-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-dev.sh
More file actions
executable file
·55 lines (47 loc) · 1.66 KB
/
Copy pathrun-dev.sh
File metadata and controls
executable file
·55 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Development start script for Linux Profile Sync
# This script builds and runs the application in debug mode
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Linux Profile Sync - Dev Start Script${NC}"
echo "======================================="
# Build the application in debug mode
echo -e "${YELLOW}Building debug binary...${NC}"
cargo build
if [ $? -ne 0 ]; then
echo -e "${RED}Build failed!${NC}"
exit 1
fi
echo -e "${GREEN}Build successful.${NC}"
# Check for BorgBackup installation
if command -v borg &> /dev/null; then
echo -e "${GREEN}✓ BorgBackup found: $(borg --version)${NC}"
else
echo -e "${YELLOW}⚠ BorgBackup not found. Backup will use tar+zstd compression.${NC}"
echo " Install BorgBackup for encrypted, incremental backups:"
echo " - Debian/Ubuntu: sudo apt install borgbackup"
echo " - Fedora: sudo dnf install borgbackup"
echo " - Arch: sudo pacman -S borg"
echo ""
fi
# Check for GTK4 and libadwaita
if pkg-config --exists gtk4 libadwaita-1; then
GTK_VERSION=$(pkg-config --modversion gtk4)
ADWAITA_VERSION=$(pkg-config --modversion libadwaita-1)
echo -e "${GREEN}✓ GTK4: $GTK_VERSION${NC}"
echo -e "${GREEN}✓ libadwaita: $ADWAITA_VERSION${NC}"
else
echo -e "${RED}✗ GTK4 or libadwaita not found!${NC}"
echo "Please install GTK4 and libadwaita development packages."
exit 1
fi
# Run the application
echo ""
echo -e "${GREEN}Starting Linux Profile Sync in development mode...${NC}"
exec ./target/debug/linux-profile-sync "$@"