Skip to content

Commit

Permalink
Fixed git patch
Browse files Browse the repository at this point in the history
  • Loading branch information
karurochari committed Apr 8, 2024
1 parent bfef165 commit 081a868
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/klipper-deployer
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ program.command('presets').description('List all available presets.').action(asy
program.command('preset').argument('<name>').description('One enter operation using one of the default presets.').action(async (arg0) => {
try {
await $`mkdir -p ./config/`.quiet()
await $`cp -p ${import.meta.dir}/../templates/profiles/${arg0}.json ./config/`.quiet()
await $`cp -p ${import.meta.dir}/../templates/profiles/${arg0}.json ./config/main.json`.quiet()
console.log(`Preset copied.`)
}
catch (e) {
Expand Down
8 changes: 4 additions & 4 deletions scripts/targets/debian-12.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ export const clone = (config: schema) => {
console.log('Cloning klipper')
await $`mkdir -p ${config.install.base}/repos/ && cd ${config.install.base}/repos/ && git clone ${config.services.klipper!.repo} --branch ${config.services.klipper!.branch} --depth 1`
for (const patch of config.services.klipper?.patches ?? []) {
await $`cd ${config.install.base}/repos/ && git patch ${import.meta.dir}/../../patches/klipper/${patch}.patch`
await $`cd ${config.install.base}/repos/ && git apply ${import.meta.dir}/../../patches/klipper/${patch}.patch`
}
},
moonraker: async () => {
console.log('Cloning moonraker')
await $`mkdir -p ${config.install.base}/repos/ && cd ${config.install.base}/repos/ && git clone ${config.services.moonraker!.repo} --branch ${config.services.moonraker!.branch} --depth 1`
for (const patch of config.services.moonraker?.patches ?? []) {
await $`cd ${config.install.base}/repos/ && git patch ${import.meta.dir}/../../patches/moonraker/${patch}.patch`
await $`cd ${config.install.base}/repos/ && git apply ${import.meta.dir}/../../patches/moonraker/${patch}.patch`
}
},
fluidd: async () => {
Expand All @@ -176,14 +176,14 @@ export const pull = (config: schema) => {
console.log('Pulling klipper')
await $`cd ${config.install.base}/repos/ && git reset --hard HEAD~1 && git pull`
for (const patch of config.services.klipper?.patches ?? []) {
await $`cd ${config.install.base}/repos/ && git patch ${import.meta.dir}/../../patches/klipper/${patch}.patch`
await $`cd ${config.install.base}/repos/ && git apply ${import.meta.dir}/../../patches/klipper/${patch}.patch`
}
},
moonraker: async () => {
console.log('Pulling moonraker')
await $`cd ${config.install.base}/repos/ && git reset --hard HEAD~1 && git pull`
for (const patch of config.services.moonraker?.patches ?? []) {
await $`cd ${config.install.base}/repos/ && git patch ${import.meta.dir}/../../patches/moonraker/${patch}.patch`
await $`cd ${config.install.base}/repos/ && git apply ${import.meta.dir}/../../patches/moonraker/${patch}.patch`
}
}
}
Expand Down

0 comments on commit 081a868

Please sign in to comment.