Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
feat(Android): Change the data files directory
Browse files Browse the repository at this point in the history
  • Loading branch information
j33h22 committed Feb 3, 2024
1 parent 1a15d87 commit 58fb5eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ func init() {

rootCmd.PersistentFlags().BoolVar(&conf.Debug, "debug", false, "enable debug log")
rootCmd.PersistentFlags().BoolVar(&conf.Test, "test", false, "enable test mode, tpclash will automatically exit after 5 minutes")
rootCmd.PersistentFlags().StringVarP(&conf.ClashHome, "home", "d", "/data/clash", "clash home dir")
rootCmd.PersistentFlags().StringVarP(&conf.ClashConfig, "config", "c", "/etc/clash.yaml", "clash config local path or remote url")
rootCmd.PersistentFlags().StringVarP(&conf.ClashUI, "ui", "u", "yacd", "clash dashboard(official|yacd)")
rootCmd.PersistentFlags().DurationVarP(&conf.CheckInterval, "check-interval", "i", 120*time.Second, "remote config check interval")
Expand All @@ -167,8 +166,15 @@ func init() {
//if branch == "premium" {
// rootCmd.PersistentFlags().BoolVar(&conf.EnableTracing, "enable-tracing", false, "auto deploy tracing dashboard")
//}

if binName == "tpclash-mihomo-android-arm64" {
rootCmd.PersistentFlags().StringVarP(&conf.ClashHome, "home", "d", "/data/adb/tpclash_bll/clash", "clash home dir (Android)")
} else {
rootCmd.PersistentFlags().StringVarP(&conf.ClashHome, "home", "d", "/data/clash", "clash home dir")
}

}

func main() {
cobra.CheckErr(rootCmd.Execute())
}
}

0 comments on commit 58fb5eb

Please sign in to comment.