shithub: ricket

Download patch

ref: 88b98bb34f3788297c5801321f7e1c8be19997f3
parent: 5f93ff10eb90274975415b2e4ff3ded4a5009914
author: Skyrbunny <[email protected]>
date: Tue Sep 12 10:32:29 EDT 2023

changing mkfile

binary files a/ricket b/ricket differ
--- a/ricket.go
+++ b/ricket.go
@@ -137,7 +137,7 @@
 	}
 
 	{ // Step 3: Write RC file
-		dst := fmt.Sprintf("%s/%s/%s", bin_dir, program_name, program_name)
+		dst := fmt.Sprintf("%s/%s", bin_dir, program_name)
 		rc, err := os.Create(dst)
 		if err != nil {
 			fmt.Printf("Error while creating rc file: %s\n", err)
@@ -174,12 +174,17 @@
 }
 
 func format_install(name string) string {
-	return fmt.Sprintf(`
+	return fmt.Sprintf(
+		`
 ARCH = %s
 USER = glenda
+PROJECT = %s
 
 install:V:
-	dircp %s /$ARCH/
-	echo "bind -b /$ARCH/%s /bin" >> /usr/$USER/lib/profile
-	`, arch, name, name)
+	mkdir -p /$ARCH/$PROJECT/bin
+	for (f in $PROJECT/*) cp $f /$ARCH/$PROJECT/bin
+	cp $PROJECT /$ARCH/$PROJECT
+	echo bind -b /$ARCH/$PROJECT /bin >> /usr/$USER/lib/profile
+`,
+		arch, name)
 }