set DFS_DEV=1 to prevent update

This commit is contained in:
Dict Xiong 2022-11-03 23:03:11 +08:00
parent 1ce4aab8a7
commit 12e5778290
3 changed files with 9 additions and 7 deletions

View File

@ -22,7 +22,7 @@ jobs:
run: |
rev=`git rev-parse HEAD`
pwd
export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1
export DFS_NO_COMPILE=1 DFS_DEV=1
./install.sh
test `git rev-parse HEAD` = "$rev"
@ -70,7 +70,7 @@ jobs:
run: |
rev=`git rev-parse HEAD`
pwd
export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1
export DFS_NO_COMPILE=1 DFS_DEV=1
./install.sh
test `git rev-parse HEAD` = "$rev"

View File

@ -25,7 +25,11 @@ if [[ "$(git rev-parse HEAD)" == "$dfs_commit" ]]; then
post_log "INFO" "$THIS_FILE" "nothing to do"
else
fmt_info "checking out to commit $dfs_commit ..."
git -c advice.detachedHead=false checkout $dfs_commit
if [[ -z "DFS_DEV" ]]; then
git -c advice.detachedHead=false checkout $dfs_commit
else
fmt_warning "won't really checkout in dev mode"
done
post_log "INFO" "$THIS_FILE" "will check out to commit $dfs_commit"
cp ./.update.sh ./update.sh && chmod +x ./update.sh && exit
fi

View File

@ -142,10 +142,8 @@ install_update(){
fmt_note "installing update.sh ..."
cp "${DOTFILES}/.update.sh" "${DOTFILES}/update.sh"
chmod +x "${DOTFILES}/update.sh"
if [[ -z "$DFS_NO_UPDATE" ]]; then
fmt_note "running update.sh ..."
${DOTFILES}/update.sh
fi
fmt_note "running update.sh ..."
${DOTFILES}/update.sh
}
uninstall_update(){