fix: standardization and auto-install support
This commit is contained in:
parent
90c9dd2622
commit
8898b12ab0
@ -10,7 +10,15 @@
|
||||
VERSION="main"
|
||||
DOMAIN="$(hostname)"
|
||||
|
||||
# Smart parameter parsing
|
||||
# Handle flags
|
||||
AUTO_YES=false
|
||||
while [[ "$1" =~ ^- ]]; do
|
||||
case "$1" in
|
||||
-y|--yes) AUTO_YES=true; shift ;;
|
||||
*) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
# if $1 looks like a version/branch (main, master, v1.0, etc.)
|
||||
if [[ "$1" == "main" || "$1" == "master" || "$1" == v[0-9]* ]]; then
|
||||
@ -48,8 +56,12 @@ fi
|
||||
# Clone or Update
|
||||
if [ -d "${INSTALL_DIR}" ]; then
|
||||
echo -e "${BLUE}Directory ${INSTALL_DIR} already exists.${NC}"
|
||||
if [ "$AUTO_YES" = true ]; then
|
||||
REPLY="y"
|
||||
else
|
||||
read -p "Overwrite? (y/N) " -n 1 -r
|
||||
echo
|
||||
fi
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
rm -rf "${INSTALL_DIR}"
|
||||
if ! git clone -b "${VERSION}" "${REPO_URL}" "${INSTALL_DIR}"; then
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
import React from 'react'
|
||||
import { BellRing, Compass, Layers, Sparkles, LayoutDashboard, type LucideIcon, PanelLeftClose, PanelLeftOpen, EyeOff } from 'lucide-react'
|
||||
import { QueryLanguage, TopologyMode } from '../store/urlState'
|
||||
import { SidebarHeader, SidebarContent } from '@/components/layout/SidebarRoot'
|
||||
import { SidebarHeader, SidebarContent } from '../../layout/SidebarRoot'
|
||||
|
||||
interface InsightSidebarContentProps {
|
||||
topologyMode: TopologyMode
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import React from 'react'
|
||||
import { QueryLanguage, TopologyMode } from '../store/urlState'
|
||||
import { SidebarRoot, SidebarHeader, SidebarContent } from '@/components/layout/SidebarRoot'
|
||||
import { SidebarRoot, SidebarHeader, SidebarContent } from '../../layout/SidebarRoot'
|
||||
import { InsightSidebarContent } from './InsightSidebarContent'
|
||||
|
||||
interface SidebarProps {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user